Dave,
You can't. When you pass the array to the ToString method, it considers
it an object, at which point, it calls the ToString method of the object
passed in. For an array, it just returns the type name.
You will have to use the BitConverter to get a string of bytes.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Dave" <Da**@discussions.microsoft.com> wrote in message
news:5D**********************************@microsof t.com...
Hi, I'm trying to convert a byte array to string
--This works...
System.BitConverter.ToString(bytes)
"EB-55-79-20-18-B2-76-4D-85-0A-93-6B-97-33-31-B8"
--This doesn't, but returns "System.Byte[]". How do I do this with
System.Convert.ToString()???
System.Convert.ToString(bytes)
"System.Byte[]"