//Define an array
int[]list = new int[ 10];
//Loop and assign a value.
for(int I = 0; I< 10; i++)
list[I]= I;
//Defines the total number of variable records.
int count = 0;
//enumeration. If it is odd, the count will be increased by 1.
Foreach (int i in the list)
if(I % 2 = = 1)count++;
//Displays the total number of odd numbers.
MessageBox。 Display (count. ToString());