Mega Code Archive

 
Categories / C# Tutorial / Data Type
 

Char type Functionality

using System; using System.Collections.Generic; using System.Text;   class Program   {     static void Main(string[] args)     {       char myChar = 'a';       Console.WriteLine("char.IsDigit('a'): {0}", char.IsDigit(myChar));       Console.WriteLine("char.IsLetter('a'): {0}", char.IsLetter(myChar));       Console.WriteLine("char.IsWhiteSpace('Hello There', 5): {0}",char.IsWhiteSpace("Hello There", 5));       Console.WriteLine("char.IsWhiteSpace('Hello There', 6): {0}",char.IsWhiteSpace("Hello There", 6));       Console.WriteLine("char.IsPunctuation('?'): {0}",char.IsPunctuation('?'));     }   }