StreamWriter.WriteLine StreamWriter.WriteLine StreamWriter.WriteLine StreamWriter.WriteLine Method

Definition

Overloads

WriteLine(String, Object, Object, Object) WriteLine(String, Object, Object, Object) WriteLine(String, Object, Object, Object) WriteLine(String, Object, Object, Object)

Writes out a formatted string and a new line to the stream, using the same semantics as Format(String, Object).

WriteLine(String, Object, Object) WriteLine(String, Object, Object) WriteLine(String, Object, Object) WriteLine(String, Object, Object)

Writes a formatted string and a new line to the stream, using the same semantics as the Format(String, Object, Object) method.

WriteLine(String, Object[]) WriteLine(String, Object[]) WriteLine(String, Object[]) WriteLine(String, Object[])

Writes out a formatted string and a new line to the stream, using the same semantics as Format(String, Object).

WriteLine(String) WriteLine(String) WriteLine(String) WriteLine(String)

Writes a string to the stream, followed by a line terminator.

WriteLine(ReadOnlySpan<Char>) WriteLine(ReadOnlySpan<Char>) WriteLine(ReadOnlySpan<Char>) WriteLine(ReadOnlySpan<Char>)

Writes the text representation of a character span to the stream, followed by a line terminator.

WriteLine(String, Object) WriteLine(String, Object) WriteLine(String, Object) WriteLine(String, Object)

Writes a formatted string and a new line to the stream, using the same semantics as the Format(String, Object) method.

WriteLine(String, Object, Object, Object) WriteLine(String, Object, Object, Object) WriteLine(String, Object, Object, Object) WriteLine(String, Object, Object, Object)

Writes out a formatted string and a new line to the stream, using the same semantics as Format(String, Object).

public:
 override void WriteLine(System::String ^ format, System::Object ^ arg0, System::Object ^ arg1, System::Object ^ arg2);
public override void WriteLine (string format, object arg0, object arg1, object arg2);
override this.WriteLine : string * obj * obj * obj -> unit
Public Overrides Sub WriteLine (format As String, arg0 As Object, arg1 As Object, arg2 As Object)

Parameters

format
String String String String

A composite format string.

arg0
Object Object Object Object

The first object to format and write.

arg1
Object Object Object Object

The second object to format and write.

arg2
Object Object Object Object

The third object to format and write.

Remarks

See WriteLine(String, Object, Object, Object) for a description of the composite formatting capabilities offered.

WriteLine(String, Object, Object) WriteLine(String, Object, Object) WriteLine(String, Object, Object) WriteLine(String, Object, Object)

Writes a formatted string and a new line to the stream, using the same semantics as the Format(String, Object, Object) method.

public:
 override void WriteLine(System::String ^ format, System::Object ^ arg0, System::Object ^ arg1);
public override void WriteLine (string format, object arg0, object arg1);
override this.WriteLine : string * obj * obj -> unit
Public Overrides Sub WriteLine (format As String, arg0 As Object, arg1 As Object)

Parameters

format
String String String String

A composite format string.

arg0
Object Object Object Object

The first object to format and write.

arg1
Object Object Object Object

The second object to format and write.

Remarks

See WriteLine(String, Object, Object) for a description of the composite formatting capabilities offered.

WriteLine(String, Object[]) WriteLine(String, Object[]) WriteLine(String, Object[]) WriteLine(String, Object[])

Writes out a formatted string and a new line to the stream, using the same semantics as Format(String, Object).

public:
 override void WriteLine(System::String ^ format, ... cli::array <System::Object ^> ^ arg);
public override void WriteLine (string format, params object[] arg);
override this.WriteLine : string * obj[] -> unit
Public Overrides Sub WriteLine (format As String, ParamArray arg As Object())

Parameters

format
String String String String

A composite format string.

arg
Object[]

An object array that contains zero or more objects to format and write.

Remarks

See WriteLine(String, Object[]) for a description of the composite formatting capabilities offered.

WriteLine(String) WriteLine(String) WriteLine(String) WriteLine(String)

Writes a string to the stream, followed by a line terminator.

public:
 override void WriteLine(System::String ^ value);
public override void WriteLine (string value);
override this.WriteLine : string -> unit
Public Overrides Sub WriteLine (value As String)

Parameters

value
String String String String

The string to write. If value is null, only the line terminator is written.

Remarks

This overload is equivalent to the TextWriter.Write(Char[]) overload.

The line terminator is defined by the CoreNewLine field.

This method does not search the specified string for individual newline characters (hexadecimal 0x000a) and replace them with NewLine.

For a list of common I/O tasks, see Common I/O Tasks.

WriteLine(ReadOnlySpan<Char>) WriteLine(ReadOnlySpan<Char>) WriteLine(ReadOnlySpan<Char>) WriteLine(ReadOnlySpan<Char>)

Writes the text representation of a character span to the stream, followed by a line terminator.

public:
 override void WriteLine(ReadOnlySpan<char> buffer);
public override void WriteLine (ReadOnlySpan<char> buffer);
override this.WriteLine : ReadOnlySpan<char> -> unit
Public Overrides Sub WriteLine (buffer As ReadOnlySpan(Of Char))

Parameters

buffer
ReadOnlySpan<Char>

The character span to write to the stream.

Remarks

The text representation of the specified value is produced by calling the ReadOnlySpan.ToString method.

The line terminator is defined by the CoreNewLine field.

For a list of common I/O tasks, see Common I/O Tasks.

WriteLine(String, Object) WriteLine(String, Object) WriteLine(String, Object) WriteLine(String, Object)

Writes a formatted string and a new line to the stream, using the same semantics as the Format(String, Object) method.

public:
 override void WriteLine(System::String ^ format, System::Object ^ arg0);
public override void WriteLine (string format, object arg0);
override this.WriteLine : string * obj -> unit
Public Overrides Sub WriteLine (format As String, arg0 As Object)

Parameters

format
String String String String

A composite format string.

arg0
Object Object Object Object

The object to format and write.

Remarks

See WriteLine(String, Object) for a description of the composite formatting capabilities offered.

Applies to