 | StringExtensionsToStream Method |
Converts the specified string into a System.IO.Stream type.
Namespace:
TestHelperExtensions
Assembly:
CBI.TestHelperExtensions (in CBI.TestHelperExtensions.dll) Version: 2.1.0.1
Syntaxpublic static Stream ToStream(
this string value
)
<ExtensionAttribute>
Public Shared Function ToStream (
value As String
) As Stream
public:
[ExtensionAttribute]
static Stream^ ToStream(
String^ value
)
[<ExtensionAttribute>]
static member ToStream :
value : string -> Stream
Parameters
- value
- Type: SystemString
The string value to be converted into a Stream.
Return Value
Type:
StreamThe resulting System.IO.Stream data type.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
String. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
RemarksSystem.IO.Stream objects implement IDisposable and therefore must
be disposed of once they are no longer needed to avoid memory leaks.
See Also