Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: string ReadAllText(this Stream, Encoding)

Declaration

public static string ReadAllText(
    this Stream stream,
    Encoding encoding = null
)

Summary

Reads all bytes from the current Stream and converts them into text using the specified encoding.

Parameters

this Streamstream Stream to read from.
Encodingencoding Encoding to expect the text to be in. If null then the UTF-8 encoding is used.

Returns

The text read from the stream.