ad wrote:
But what does GetEncoding("iso-8859-1") mean?
It means to use the ISO-Latin-1 encoding.
Can I use
System.Text.Encoding.Unicode.GetBytes(("my string");
Absolutely. It'll give you different results though. A stream
inherently deals with binary data, and a string is comprised of
character data. The encoding you use specifies the conversion from the
character data to binary data. For instance, using Encoding.Unicode you
will always see two bytes for each character. Using
Encoding.GetEncoding("iso-8859-1") you will always see one byte per
character, but many characters will not be represented correctly.
Jon