StreamExtensionsToMemoryStream Method (Stream)Document Toolkit Help
Copies the entire contents of specified stream to a new memory stream.

Namespace: FirstFloor.Documents.IO
Assembly: FirstFloor.Documents (in FirstFloor.Documents.dll) Version: (

public static MemoryStream ToMemoryStream(
	this Stream stream


Type: System.IOStream
The stream.

Return Value

Type: MemoryStream
The memory stream.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Stream. 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).
See Also