ExtensionMethod.NET Home of 880 C#, Visual Basic, F# and Javascript extension methods
Returns a stream when given a string
<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
Dim MyStream as Stream = "Fred".ToStream
Author: Rory Becker
Submitted on: 7 feb. 2011
Language: VB
Type: System.String
Views: 4815