return a 2 dimensional array method

  • Thread starter Thread starter amit sinha
  • Start date Start date
A

amit sinha

i need to a method where i add elements in array list and the method
should be returning type..
 
Amit,

What's the question? Please be more clear and specific.


Stephan
 
...
i need to a method where i add elements in array list
and the method should be returning type..

I suppose you don't really mean an ArrayList, as that's contradictory to the
subject line.

If you want to create a method that returns a 2 dimensional array, that's
easy...

....

public int[,] MyMethod()
{
int[,] myArray = new int[10,10]

/// Here you can elements to the array in any way you like...

return myArray;
}

....



/// Bjorn A
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top