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
Write the syntax for catching an exception in c#?
What is int parse in c#?
Is vs as c#?
Which is faster iqueryable or ienumerable?
Explain About namespaces
Is c# an array?
Do vs while c#?
What is ado c#?
Are c# objects passed by reference?
Is there regular expression (regex) support available to c# developers?
Okay, so an int is a value type, and a class is a reference type. How can int be derived from object?
What is writeline?
What is typeof undefined?
Can constructor be private c#?
What is the different types of private assembly and shared assembly?