Does C# supports multi-dimensional arrays?
Answer Posted / anand
Yes in addition to single-dimensional arrays, C# supports
the declaration of multidimensional arrays where each
dimension of the array is separated by a comma. Here I'm
declaring a three-dimensional array of doubles: -
double[,,] numbers;
Examples:
currentMonth=10;
sales = new double[2, currentMonth];
for (int i = 0; i < sales.GetLength(0); i++)
{
for (int j=0; j < 10; j++)
{
sales[i,j] = (i * 100) + j;
}
}
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Can u list some style properties of List Box?
Is it true that all c# types derive from a common base class?
Can you change the value of a constant filed after its declaration?
What type of data type conversion happens when the compiler encounters the following code?
Why we use get and set property in c#?
update data in an xml file which resides in solution itself, using silverlight 4.0
Why do we Need of static class in c#?
What is difference between private and protected?
Which .gang of four. Design pattern is shown below?
What is transparent caching with aop ?
How can we make a thread sleep for infinite period ?
Can we inherit static class in c#?
What is the benefit of using interface in c#?
What is the and operator in c#?
What are the string functions in c#?