function(int[] me)
{
//Whatever
}
main()
{
int[,] numbers = new int[3, 2] { {1, 2}, {3, 4}, {5, 6} };
function(numbers[1]);
}
So here, I’d want to pass int[] {3,4} to the function… but that doesn’t work. Is there a way to do that?
I think you want to use a jagged array instead of a 2d array. There is more information here:
http://msdn.microsoft.com/en-us/library/aa288453%28VS.71%29.aspx
an example from that page is:
int[][] numbers = new int[2][] { new int[] {2,3,4}, new int[] {5,6,7,8,9} };