Groups | Blog | Home
all groups > c# > july 2005 >

c# : Converting String to Byte array


crater
7/8/2005 11:21:01 PM
I need to convert a String to a Byte array and vice versa. Can someone nudge
Bruce Wood
7/8/2005 11:58:08 PM
Look at the System.Text.Encoding classes, for example AsciiEncoding,
UTF8Encoding, etc.
Jon Skeet [C# MVP]
7/9/2005 8:50:32 AM
[quoted text, click to view]

See http://www.pobox.com/~skeet/csharp/unicode.html

Basically, you need Encoding.GetBytes and Encoding.GetString.

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
AddThis Social Bookmark Button