ToStream

    <Extension()> _
    Public Function ToStream(ByVal Source As String) As System.IO.MemoryStream
        Dim Bytes() As Byte = System.Text.Encoding.ASCII.GetBytes(Source)
        Return New System.IO.MemoryStream(Bytes)
    End Function
Example:
Dim MyStream as Stream = "Fred".ToStream

Description

Returns a stream when given a string

Details

Double click on the code to select all.

 

;