Arrays

Although the number of dimensions is included in array declarations, the size of each dimension is not

string[] s;

s = new string[5];

string[] s = new string[5]

Accessing Array Elements

using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
int[] evenNums = new int[5];
evenNums[0] = 2;
evenNums[1] = 4;
//evenNums[6] = 12; //Throws run-time exception IndexOutOfRange

Console.WriteLine(evenNums[0]); //prints 2
Console.WriteLine(evenNums[1]); //prints 4

}
}
}