<mo*********@gmail.com> wrote:
I have an application that stores raw .wav files (and also
jpgs/bitmaps) within strings, and I need to sometimes convert these
strings to byte arrays, and sometimes go from byte arrays back to
strings.
In that case you should use Base64 - use Convert.ToBase64String and
Convert.FromBase64String. Encoding arbitrary binary data as strings
without care is very, very likely to cause you problems later on. Using
Base64 should keep you away from those problems.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too