1// declares a 1D Array of string.
2string[] weekDays;
3// allocating memory for days.
4weekDays = new string[] {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
5// Display length of array.
6Console.Write(weekDays.Length);
1 public int[] number = new int[2 /* the number here declares the lenght, not the index*/ ];
2 int[1 /*this number here declares the index*/] = 69;
1int array[] array;
2int index;
3public void func(){
4 for(int i; i < array.Length;i++){
5 index++;
6 }
7 Console.Write(index);
8}