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


Please Help Members By Posting Answers For Below Questions

What is multidimensional array in c#?

464


Describe the process of “exception handling implementation” in c#?

517


What are the return types in c#?

497


Explain the difference between event and a delegate in c#?

534


What are custom attributes in c#?

499






What are the Types of configuration files and their differences

550


What is lazy loading and eager loading in c#?

486


What is windows form in c#?

539


Explain the difference between user control and custom control. Also, explain their use.

591


What is a streamwriter in c#?

508


What is console read in c#?

488


How does foreach loop work in c#?

481


Does google use c#?

517


What is a statement c#?

506


How long can a string be c#?

511