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
What is executenonquery c#?
How to use exception handling in stored procedure?
How do you comment in c#?
Explain the difference between the debug class and trace class?
How many constructors can a class have in c#?
What is the difference between an application domain and a process?
who is a protected class-level variable available to?
What is use of singleton class in c#?
Is c# used for any core features of windows vista?
Explain the difference between abstract class and interface.
What is a verbatim string literal and why do we use it?
Is array passed by reference in c#?
What is difference between array and arraylist c#?
What is a callback c#?
How many bytes is an int?