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
Explain static class members.
Tell me the difference between call by value and call by reference.
How more than one version of an assembly can keep in same place?
What is var c#?
Can we change static value in c#?
Differentiate between copy and default constructor.
What is difference between managed and unmanaged code?
What is a class level variable in c#?
How main method is called in c#?
What is the difference between iqueryable and ienumerable?
What is clr namespace?
How does dictionary work in c#?
Can we have multiple threads in one app domain?
Why do we use readonly in c#?
When should we use sealed class in c#?