Thursday, March 1, 2012

Declaring a two dimensional array


Share at Facebook

Unlike any other languages, C# maintains this in a different way. For example a two dimensional array 10x10 can be declared as below:

int[,] twoDimensionalArray = new int[10,10];

inside the brackets, add more commas according to your needs which will just increase a dimension.




No comments: