introductory-examples/simple-types/ex2.cs - Demonstrations of the simple type char in C#. | Lecture 2 - slide 7 : 43 Program 2 |
using System; class CharDemo{ public static void Main(){ char ch1 = 'A', ch2 = '\u0041', ch3 = '\u00c6', ch4 = '\u00d8', ch5 = '\u00c5', ch6; Console.WriteLine("ch1 is a letter: {0}", char.IsLetter(ch1)); Console.WriteLine("{0} {1} {2}", ch3, ch4, char.ToLower(ch5)); ch6 = char.Parse("B"); Console.WriteLine("{0} {1}", char.GetNumericValue('3'), char.GetNumericValue('a')); } }