Does C# supports multi-dimensional arrays?
Answers were Sorted based on User's Feedback
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 |
What are the types of operator?
What is extension method in c sharp?
Can list contain duplicates c#?
What type is string in c#?
What are the different types of comments in c#?
What is private in c#?
Which is faster hashtable or dictionary?
What is the difference between ienumerable and icollection?
Illustrate namespaces in c#?
What is an abstract class c#?
What are the drawbacks of extending an interface as opposed to extending a class?
Explain the types of comments in c#?