Edit

Share via


IndentedTextWriter.WriteLineAsync Method

Definition

Overloads

WriteLineAsync()

Asynchronously writes the line terminator to the underlying TextWriter.

WriteLineAsync(Char)

Asynchronously writes the specified Char to the underlying TextWriter followed by a line terminator, inserting tabs at the start of every line.

WriteLineAsync(String)

Asynchronously writes the specified string followed by a line terminator to the underlying TextWriter, inserting tabs at the start of every line.

WriteLineAsync(ReadOnlyMemory<Char>, CancellationToken)

Asynchronously writes the specified characters followed by a line terminator to the underlying TextWriter, inserting tabs at the start of every line.

WriteLineAsync(StringBuilder, CancellationToken)

Asynchronously writes the contents of the specified StringBuilder followed by a line terminator to the underlying TextWriter, inserting tabs at the start of every line.

WriteLineAsync(Char[], Int32, Int32)

Asynchronously writes the specified number of characters from the specified buffer followed by a line terminator, to the underlying TextWriter, starting at the specified index within the buffer, inserting tabs at the start of every line.

WriteLineAsync()

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Asynchronously writes the line terminator to the underlying TextWriter.

public:
 override System::Threading::Tasks::Task ^ WriteLineAsync();
public override System.Threading.Tasks.Task WriteLineAsync ();
override this.WriteLineAsync : unit -> System.Threading.Tasks.Task
Public Overrides Function WriteLineAsync () As Task

Returns

A Task representing the asynchronous line writing operation.

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by WriteLine().

Applies to

WriteLineAsync(Char)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Asynchronously writes the specified Char to the underlying TextWriter followed by a line terminator, inserting tabs at the start of every line.

public:
 override System::Threading::Tasks::Task ^ WriteLineAsync(char value);
public override System.Threading.Tasks.Task WriteLineAsync (char value);
override this.WriteLineAsync : char -> System.Threading.Tasks.Task
Public Overrides Function WriteLineAsync (value As Char) As Task

Parameters

value
Char

The character to write.

Returns

A Task representing the asynchronous operation.

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by WriteLine(Char).

Applies to

WriteLineAsync(String)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Asynchronously writes the specified string followed by a line terminator to the underlying TextWriter, inserting tabs at the start of every line.

public:
 override System::Threading::Tasks::Task ^ WriteLineAsync(System::String ^ value);
public override System.Threading.Tasks.Task WriteLineAsync (string? value);
override this.WriteLineAsync : string -> System.Threading.Tasks.Task
Public Overrides Function WriteLineAsync (value As String) As Task

Parameters

value
String

The string to write.

Returns

A Task representing the asynchronous operation.

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by WriteLine(String).

Applies to

WriteLineAsync(ReadOnlyMemory<Char>, CancellationToken)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Asynchronously writes the specified characters followed by a line terminator to the underlying TextWriter, inserting tabs at the start of every line.

public override System.Threading.Tasks.Task WriteLineAsync (ReadOnlyMemory<char> buffer, System.Threading.CancellationToken cancellationToken = default);
override this.WriteLineAsync : ReadOnlyMemory<char> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overrides Function WriteLineAsync (buffer As ReadOnlyMemory(Of Char), Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

buffer
ReadOnlyMemory<Char>

The characters to write.

cancellationToken
CancellationToken

Token for canceling the operation.

Returns

A Task representing the asynchronous operation.

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

Applies to

WriteLineAsync(StringBuilder, CancellationToken)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Asynchronously writes the contents of the specified StringBuilder followed by a line terminator to the underlying TextWriter, inserting tabs at the start of every line.

public override System.Threading.Tasks.Task WriteLineAsync (System.Text.StringBuilder? value, System.Threading.CancellationToken cancellationToken = default);
override this.WriteLineAsync : System.Text.StringBuilder * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overrides Function WriteLineAsync (value As StringBuilder, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

value
StringBuilder

The text to write.

cancellationToken
CancellationToken

Token for canceling the operation.

Returns

A Task representing the asynchronous operation.

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

Applies to

WriteLineAsync(Char[], Int32, Int32)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Asynchronously writes the specified number of characters from the specified buffer followed by a line terminator, to the underlying TextWriter, starting at the specified index within the buffer, inserting tabs at the start of every line.

public:
 override System::Threading::Tasks::Task ^ WriteLineAsync(cli::array <char> ^ buffer, int index, int count);
public override System.Threading.Tasks.Task WriteLineAsync (char[] buffer, int index, int count);
override this.WriteLineAsync : char[] * int * int -> System.Threading.Tasks.Task
Public Overrides Function WriteLineAsync (buffer As Char(), index As Integer, count As Integer) As Task

Parameters

buffer
Char[]

The buffer containing characters to write.

index
Int32

The index within the buffer to start writing at.

count
Int32

The number of characters to write.

Returns

A Task representing the asynchronous operation.

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by WriteLine(Char[], Int32, Int32).

Applies to