Does C# supports multi-dimensional arrays?

Answers were Sorted based on User's Feedback



Does C# supports multi-dimensional arrays?..

Answer / naveen

yes, also know jagged arrays

Is This Answer Correct ?    6 Yes 0 No

Does C# supports multi-dimensional arrays?..

Answer / 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

Does C# supports multi-dimensional arrays?..

Answer / kautilya

yes

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What are the types of operator?

0 Answers  


What is extension method in c sharp?

0 Answers  


Can list contain duplicates c#?

0 Answers  


What type is string in c#?

0 Answers  


What are the different types of comments in c#?

0 Answers  


What is private in c#?

0 Answers  


Which is faster hashtable or dictionary?

0 Answers  


What is the difference between ienumerable and icollection?

0 Answers  


Illustrate namespaces in c#?

0 Answers  


What is an abstract class c#?

0 Answers  


What are the drawbacks of extending an interface as opposed to extending a class?

0 Answers  


Explain the types of comments in c#?

0 Answers  


Categories