Click here to Skip to main content
14,697,191 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to pass jagged array as a parameter of function and get return the same array with modification from that function.


Not for certain, but if it follows the similar syntax of a regular array, then wouldn't the signature of the method look something like this:

private void MyMethod(int[][] a)

and the call would be:

Have you Googled[^] for a solution?

Here, take a look, first hit - jagged array example[^]

Also, a bit more Google-fu - jagged array routine parameter[^]

Please, in the future, take a look at the FAQs first (Q&A FAQ[^] and also Pete O'Hanlon's FAQ[^]), then try to find a solution by yourself - Google is your friend

For problems with your own code, we're glad to help. Hell, we sometimes actually like it. Doing your work (or even worse, your Google searches for you), not at all

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900