If the byte[] are byte representation of a string, and you want to
retrieve the string,
System.Encoding.Default.GetString (byte[])... (NOTE: you can also use
any other encoding such as UTF8)
If you just want to convert an array of bytes to string for storage or
passing it around, you can do this
string byteString = Convert.ToBase64String (byte[]);
To convert the string back to bytes
byte[] byteArr = Convert.FromBase64String (string);
Alternatively, replace ASCIIEncoding with UnicodeEncoding, UTF7Encoding or
UTF8Encoding.
Pete
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.