Click or drag to resize

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
Syntax
public static Stream ToStream(
	this string value
)

Parameters

value
Type: SystemString
The string value to be converted into a Stream.

Return Value

Type: Stream
The 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).
Remarks
System.IO.Stream objects implement IDisposable and therefore must be disposed of once they are no longer needed to avoid memory leaks.
See Also