Assign values to char array elements
using System;
class MainClass
{
static void Main(string[] args)
{
char[] MyChar = new char[6];
MyChar[0] = 'H';
MyChar[1] = 'e';
MyChar[2] = 'l';
MyChar[3] = 'l';
MyChar[4] = 'o';
MyChar[5] = '\0';
Console.WriteLine(MyChar);
}
}
|
HTML code for linking to this page:
Related in same category :
-
-
-
|