Convert String to ASCII in C#

Here is a small example to convert String or character to ASCII in c#
const string input = "Venkat";
byte[] array = Encoding.ASCII.GetBytes(input);


foreach (byte element in array)


{


Console.WriteLine("{0} = {1}", element, (char)element);


}


Cheers, 
Venkatesan Prabu .J 
Head, KaaShiv InfoTech