TextReader.ReadToEndAsync TextReader.ReadToEndAsync TextReader.ReadToEndAsync TextReader.ReadToEndAsync Method

Definition

Reads all characters from the current position to the end of the text reader asynchronously and returns them as one string.

public:
 virtual System::Threading::Tasks::Task<System::String ^> ^ ReadToEndAsync();
[System.Runtime.InteropServices.ComVisible(false)]
public virtual System.Threading.Tasks.Task<string> ReadToEndAsync ();
abstract member ReadToEndAsync : unit -> System.Threading.Tasks.Task<string>
override this.ReadToEndAsync : unit -> System.Threading.Tasks.Task<string>
Public Overridable Function ReadToEndAsync () As Task(Of String)

Returns

A task that represents the asynchronous read operation. The value of the TResult parameter contains a string with the characters from the current position to the end of the text reader.

Exceptions

Remarks

The TextReader class is an abstract class. Therefore, you do not instantiate it in your code. For an example of using the ReadToEndAsync method, see the StreamReader.ReadToEndAsync method.

Applies to

See also