using System;
class MainClass
{
public static void Main()
{
char[] charArray = new char[5];
Console.WriteLine("charArray[0] = " + charArray[0]);
charArray[0] = 'h';
charArray[1] = 'e';
charArray[2] = 'l';
charArray[3] = 'l';
charArray[4] = 'o';
for (int counter = 0; counter < charArray.Length; counter++)
{
Console.WriteLine("charArray[" + counter + "] = " +
charArray[counter]);
}
}
}
|