how to know lenght of array in c# code example
Example 1: c# length of array
// declares a 1D Array of string.
string[] weekDays;
// allocating memory for days.
weekDays = new string[] {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
// Display length of array.
Console.Write(weekDays.Length);
Example 2: c# array lenght
int arraylenght = YourArray.Length;