Assuming you want the string's stream encoded in UTF8:
System.IO.MemoryStream = new System.IO.MemoryStream(
System.Text.Encoding.UTF8.GetBytes( "the string"));
Depending on what you really want to do, you might be better served
using the StringReader class. It's not an IO.Stream, but it makes for
easy text-oriented reading of a string.
Assuming you want the string's stream encoded in UTF8:
System.IO.MemoryStream = new System.IO.MemoryStream(
System.Text.Encoding.UTF8.GetBytes( "the string"));
Depending on what you really want to do, you might be better served
using the StringReader class. It's not an IO.Stream, but it makes for
easy text-oriented reading of a string.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.