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 multidimensional array in c#?
Describe the process of “exception handling implementation” in c#?
What are the return types in c#?
Explain the difference between event and a delegate in c#?
What are custom attributes in c#?
What are the Types of configuration files and their differences
What is lazy loading and eager loading in c#?
What is windows form in c#?
Explain the difference between user control and custom control. Also, explain their use.
What is a streamwriter in c#?
What is console read in c#?
How does foreach loop work in c#?
Does google use c#?
What is a statement c#?
How long can a string be c#?