ToStream

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();

Description

Converts a String to a MemoryStream

Details

Double click on the code to select all.

 

;