Use Base64 instead. BitConverter.ToString(bytes) is just simple way to
formatted hex string from byte array.
byte[] myBytes = new byte[]{1,2,3};
string b64 = Convert.ToBase64String(myBytes);
Console.WriteLine(b64);
// Convert back to bytes.
byte[] myBytes2 = Convert.FromBase64String(b64);
Console.WriteLine("myBytes.Length:"+myBytes2.Lengt h);
--
William Stacey, MVP
http://mvp.support.microsoft.com
"Timothy V" <tr****@msn.com> wrote in message
news:ua**************@TK2MSFTNGP09.phx.gbl...
Hi,
I have a byte[] that i want to convert into a string. I use the
BitConverter.ToString() method.
Now, how do I convert that string back into a byte[]?
Thanks in advance,
Tim.