I have used Visual Studio 2012 for debugging purpose. But you can use any version of visul studio as per your availability.
using System;
class Program
{
static void Main()
{
int[] arrayA = new int[10];
int lengthA = arrayA.Length;
Console.WriteLine("Length of ArrayA : {0}", +lengthA);
long longLength = arrayA.LongLength;
Console.WriteLine("Length of the Long Length Array : {0}", longLength);
int[,] twoD = new int[20, 50];
Console.WriteLine("The Size of 2D Array is : {0}", twoD.Length);
Console.ReadLine();
}
}
I have used Visual Studio 2012 for debugging purpose. But you can use any version of visul studio as per your availability.
Result:
Length of ArrayA : 10
Length of the Long Length Array : 10
The Size of 2D Array is : 1000
need an explanation for this answer? contact us directly to get an explanation for this answer