June 2003
Intermediate to advanced
800 pages
34h 20m
English
You need to convert a byte array into a string representation.
If you are creating a string representation of arbitrary binary data, use BitConverter.ToString or Convert.ToBase64String. If you are restoring text stored in binary format, call the GetString method of the appropriate encoding object in the System.Text namespace.
There are several solutions to this time-honored problem, depending on the task you need to accomplish. The quickest approach is to use the System.BitConverter class, which provides shared methods for converting basic data types into byte arrays and vice versa. In this case, you simply need to use the overloaded ToString method that accepts a byte array.
Read now
Unlock full access