c# how to set array length code example
Example 1: how to declare an array lenght in c#
public int[] number = new int[2 /* the number here declares the lenght, not the index*/ ];
int[1 /*this number here declares the index*/] = 69;
Example 2: how to get an arrays length in c#
int array[] array;
int index;
public void func(){
for(int i; i < array.Length;i++){
index++;
}
Console.Write(index);
}