Arrays in C#

The index can be a variable.

 int[] num= { 3, 5, 7 };
 int j = 2;
 this.Text = "" + num[j];  
 

In the example above j is 2 so num[j] is 7, and that is what appears in the text of the form.

This makes it easy to use loops to process the array:
int[] num= { 3, 5, 7, 1, 6 };
int total = 0;
for(int j = 0; j < num.Length; j++)
{
   total += num[j];
}
this.Text = "" + total;

Notice the use of num.Length in the for loop.
The length of the array is 5 (the number of elements).
The loop adds together elements from num[0] (the first element) to num[5] (the last element.)

NEXT: Out of bounds: An exception