IndentedTextWriter.WriteLine Method

Definition

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

Overloads

WriteLine(String, Object, Object)

Writes out a formatted string, followed by a line terminator, using the same semantics as specified.

WriteLine(Char[], Int32, Int32)

Writes a subarray of characters, followed by a line terminator, to the text stream.

WriteLine(String, ReadOnlySpan<Object>)

Writes out a formatted string, followed by a line terminator, using the same semantics as specified.

WriteLine(String, Object[])

Writes out a formatted string, followed by a line terminator, using the same semantics as specified.

WriteLine(String, Object)

Writes out a formatted string, followed by a line terminator, using the same semantics as specified.

WriteLine(String)

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

WriteLine(Single)

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

WriteLine(UInt32)

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

WriteLine(Int64)

Writes the text representation of an 8-byte integer, followed by a line terminator, to the text stream.

WriteLine(Int32)

Writes the text representation of an integer, followed by a line terminator, to the text stream.

WriteLine(Double)

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

WriteLine(Char[])

Writes a character array, followed by a line terminator, to the text stream.

WriteLine(Char)

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

WriteLine(Boolean)

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

WriteLine()

Writes a line terminator.

WriteLine(Object)

Writes the text representation of an object, followed by a line terminator, to the text stream.

WriteLine(String, Object, Object)

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

Writes out a formatted string, followed by a line terminator, using the same semantics as specified.

C#
public override void WriteLine(string format, object? arg0, object? arg1);
C#
public override void WriteLine(string format, object arg0, object arg1);

Parameters

format
String

The formatting string to use.

arg0
Object

The first object to write into the formatted string.

arg1
Object

The second object to write into the formatted string.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WriteLine(Char[], Int32, Int32)

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

Writes a subarray of characters, followed by a line terminator, to the text stream.

C#
public override void WriteLine(char[] buffer, int index, int count);

Parameters

buffer
Char[]

The character array to write data from.

index
Int32

Starting index in the buffer.

count
Int32

The number of characters to write.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WriteLine(String, ReadOnlySpan<Object>)

Writes out a formatted string, followed by a line terminator, using the same semantics as specified.

C#
public override void WriteLine(string format, scoped ReadOnlySpan<object?> arg);

Parameters

format
String

The formatting string to use.

arg
ReadOnlySpan<Object>

The argument span to output.

Applies to

.NET 10 and .NET 9
Product Versions
.NET 9, 10

WriteLine(String, Object[])

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

Writes out a formatted string, followed by a line terminator, using the same semantics as specified.

C#
public override void WriteLine(string format, params object?[] arg);
C#
public override void WriteLine(string format, params object[] arg);

Parameters

format
String

The formatting string to use.

arg
Object[]

The argument array to output.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WriteLine(String, Object)

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

Writes out a formatted string, followed by a line terminator, using the same semantics as specified.

C#
public override void WriteLine(string format, object? arg0);
C#
public override void WriteLine(string format, object arg0);

Parameters

format
String

The formatting string.

arg0
Object

The object to write into the formatted string.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WriteLine(String)

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

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

C#
public override void WriteLine(string? s);
C#
public override void WriteLine(string s);

Parameters

s
String

The string to write.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WriteLine(Single)

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

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

C#
public override void WriteLine(float value);

Parameters

value
Single

The single to write.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WriteLine(UInt32)

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

Important

This API is not CLS-compliant.

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

C#
[System.CLSCompliant(false)]
public override void WriteLine(uint value);

Parameters

value
UInt32

A UInt32 to output.

Attributes

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WriteLine(Int64)

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

Writes the text representation of an 8-byte integer, followed by a line terminator, to the text stream.

C#
public override void WriteLine(long value);

Parameters

value
Int64

The 8-byte integer to write.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WriteLine(Int32)

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

Writes the text representation of an integer, followed by a line terminator, to the text stream.

C#
public override void WriteLine(int value);

Parameters

value
Int32

The integer to write.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WriteLine(Double)

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

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

C#
public override void WriteLine(double value);

Parameters

value
Double

The double to write.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WriteLine(Char[])

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

Writes a character array, followed by a line terminator, to the text stream.

C#
public override void WriteLine(char[]? buffer);
C#
public override void WriteLine(char[] buffer);

Parameters

buffer
Char[]

The character array to write.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WriteLine(Char)

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

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

C#
public override void WriteLine(char value);

Parameters

value
Char

The character to write.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WriteLine(Boolean)

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

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

C#
public override void WriteLine(bool value);

Parameters

value
Boolean

The Boolean to write.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WriteLine()

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

Writes a line terminator.

C#
public override void WriteLine();

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

WriteLine(Object)

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

Writes the text representation of an object, followed by a line terminator, to the text stream.

C#
public override void WriteLine(object? value);
C#
public override void WriteLine(object value);

Parameters

value
Object

The object to write.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1