Click or drag to resize

ExtensionsReadToEnd Method (Stream)

Reads all characters from the current position to the end of the stream.

Namespace:  Cauldron
Assembly:  Cauldron (in Cauldron.dll) Version: 3.2.0.2
Syntax
public static string ReadToEnd(
	this Stream stream
)

Parameters

stream
Type: System.IOStream
The stream to read

Return Value

Type: String
The rest of the stream as a string, from the current position to the end. If the current position is at the end of the stream, returns an empty string ("").

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).
Exceptions
ExceptionCondition
OutOfMemoryException There is insufficient memory to allocate a buffer for the returned string.
IOExceptionAn I/O error occurs.
See Also