It depends on the encoding of your string (ASCIIASCII, UTF8UTF-8, ...).
e.g.For example:
byte[] b1 = System.Text.Encoding.UTF8.GetBytes (myString);
byte[] b2 = System.Text.Encoding.ASCII.GetBytes (myString);
Update: A A small sample why encoding matters:
string pi = "\u03a0";
byte[] ascii = System.Text.Encoding.ASCII.GetBytes (pi);
byte[] utf8 = System.Text.Encoding.UTF8.GetBytes (pi);
Console.WriteLine (ascii.Length); //willWill print 1
Console.WriteLine (utf8.Length); //willWill print 2
Console.WriteLine (System.Text.Encoding.ASCII.GetString (ascii)); //willWill print '?'
ASCII simply isn't equipped to deal with special characters.
Internally, the .NET framework uses UTF16UTF-16 to represent strings, so if you simply want to get the exact bytes that .NET uses, use System.Text.Encoding.Unicode.GetBytes (...).
See msdnCharacter Encoding in the .NET Framework (MSDN) for more information.