Search This Blog

Friday, October 25, 2013

Char type in C #

Types in C# > Char

Char type in C# declares a Unicode character.
Unicode characters are 16-bit characters that are used to represent most of the known written languages throughout the world.

Example of char:

1.
char[] chs = new char[2];
chs[0] = 'U'; // Character literal
chs[1] = (char)85; // Cast from integral type
foreach (char c in chs)
   MessageBox.Show(c.ToString());

2. Null Char