ToStream
Converts a String to a MemoryStream
Source
public System.IO.MemoryStream ToStream(this string Source)
{
byte[] Bytes = System.Text.Encoding.ASCII.GetBytes(Source);
return new System.IO.MemoryStream(Bytes);
}
Example
stream MyStream = "Fred".ToStream();