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 is the base class of all classes in c#?
What is difference between the "throw" and "throw ex" in .net?
How much time will it take to learn unity?
What is the advantage of generics in c#?
what are ways to debug the code step by step except using breakpoints?
In object oriented programming, how would you describe encapsulation in c#?
example of uniary operators and binary operators
Define satellite assembly in c#?
What is uint16?
c# code for how to merge two sorted arrays Input : A = 2,5,8,4 B = 3,9,10,5 Output : 2,3,4,5,5,8,9,10
What is the Signification of the "new " keyword in C#? example
What does assert() do?