0

can you use foreach for multidimentional arrays?

9th May 2017, 2:34 PM
Jeff Bate
Jeff Bate - avatar
1 Respuesta
+ 1
yes you can. example int[,] arr = { {1,2,3}, {4,5,6}, {7,8,9} }; foreach(var x in arr){ Console.Write(x+","); } // output 1,2,3,4,5,6 ,7,8,9,
9th May 2017, 2:50 PM
MR Programmer
MR Programmer - avatar