An array is a collection of variables of the same type that are referred to by a common name.
To declare a one-dimensional array, you will use this general form:
type[ ] array-name = new type[size];
using System;
class MainClass {
public static void Main() {
int[] sample = new int[10];
int i;
for(i = 0; i < 10; i = i+1)
sample[i] = i;
for(i = 0; i < 10; i = i+1)
Console.WriteLine("sample[" + i + "]: " +
sample[i]);
}
}