Length of two dimensional !!!!!!!!
-
hello..... I had crated one array dynamically from database..... nwo i want to know the dimesion of each column.... i.e. Here I am Providing already created 2-dim array string[,] colArray = new string[,] { { "StatusID", "System.Int32", "ABC" }, { "StatusMsg", "System.String", "ABC" }, { "Size", "System.Double", "ABC" } }; colArray[i,j] what i want to know value of i and j........
-
hello..... I had crated one array dynamically from database..... nwo i want to know the dimesion of each column.... i.e. Here I am Providing already created 2-dim array string[,] colArray = new string[,] { { "StatusID", "System.Int32", "ABC" }, { "StatusMsg", "System.String", "ABC" }, { "Size", "System.Double", "ABC" } }; colArray[i,j] what i want to know value of i and j........
Well, colArray.Length gets you the length of the 1st dimension, and colArray[0].Length gets the 2nd dimension. This (of course) assumes that you haven't created jagged arrays.
Deja View - the feeling that you've seen this post before.