IndentedTextWriter Class

public sealed class IndentedTextWriter : TextWriter

No documentation is available.

Inheritance
TextWriter IndentedTextWriter

Constructors

NameDescription
IndentedTextWriter(TextWriter)Initializes a new instance of the IndentedTextWriter class using the specified text writer and default tab string.
IndentedTextWriter(TextWriter, string)Initializes a new instance of the IndentedTextWriter class using the specified text writer and tab string.

IndentedTextWriter overloads

IndentedTextWriter(TextWriter)

IndentedTextWriter.cs

Initializes a new instance of the IndentedTextWriter class using the specified text writer and default tab string.

public IndentedTextWriter(TextWriter writer)
Parameters
writer TextWriter
The TextWriter to use for output.

IndentedTextWriter(TextWriter, string)

IndentedTextWriter.cs

Initializes a new instance of the IndentedTextWriter class using the specified text writer and tab string.

public IndentedTextWriter(TextWriter writer, string tabString)
Parameters
writer TextWriter
The TextWriter to use for output.
tabString string
The tab string to use for indentation.

Properties

NameDescription
EncodingGets the encoding for the text writer to use.
IndentGets or sets the number of spaces to indent.
InnerWriterGets the TextWriter to use.
NewLineGets or sets the new line character to use.

Gets the encoding for the text writer to use.

public override Encoding Encoding { get; }

Property value

Encoding

Gets or sets the number of spaces to indent.

public int Indent { get; set; }

Property value

int

Gets the TextWriter to use.

public TextWriter InnerWriter { get; }

Property value

TextWriter

Gets or sets the new line character to use.

public override string NewLine { get; set; }

Property value

string

Methods

NameDescription
Flush()Flushes the stream.
Write(bool)Writes the text representation of a Boolean value to the text stream.
Write(char)Writes a character to the text stream.
Write(char[]?)Writes a character array to the text stream.
Write(char[], int, int)Writes a subarray of characters to the text stream.
Write(double)Writes the text representation of a Double to the text stream.
Write(int)Writes the text representation of an integer to the text stream.
Write(long)Writes the text representation of an 8-byte integer to the text stream.
Write(object?)Writes the text representation of an object to the text stream.
Write(float)Writes the text representation of a Single to the text stream.
Write(string?)Writes the specified string to the text stream.
Write(string, object?)Writes out a formatted string, using the same semantics as specified.
Write(string, object?, object?)Writes out a formatted string, using the same semantics as specified.
Write(string, object?[])Writes out a formatted string, using the same semantics as specified.
WriteLine()Writes a line terminator.
WriteLine(bool)Writes the text representation of a Boolean, followed by a line terminator, to the text stream.
WriteLine(char)Writes a character, 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[], int, int)Writes a subarray of characters, 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(int)Writes the text representation of an integer, followed by a line terminator, to the text stream.
WriteLine(long)Writes the text representation of an 8-byte integer, followed by a line terminator, to the text stream.
WriteLine(object?)Writes the text representation of an object, followed by a line terminator, to the text stream.
WriteLine(float)Writes the text representation of a Single, followed by a line terminator, to the text stream.
WriteLine(string?)Writes the specified string, followed by a line terminator, to the text stream.
WriteLine(string, object?)Writes out a formatted string, followed by a line terminator, using the same semantics as specified.
WriteLine(string, object?, 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(uint)Writes the text representation of a UInt32, followed by a line terminator, to the text stream.
WriteLineNoTabs(string)Writes the specified string to a line without tabs.

Flushes the stream.

public override void Flush()

Write overloads

Writes the text representation of a Boolean value to the text stream.

public override void Write(bool value)
Parameters
value bool
The Boolean value to write.

Writes a character to the text stream.

public override void Write(char value)
Parameters
value char
The character to write.

Write(char[]?)

IndentedTextWriter.cs

Writes a character array to the text stream.

public override void Write(char[]? buffer)
Parameters
buffer char[]?
The character array to write.

Write(char[], int, int)

IndentedTextWriter.cs

Writes a subarray of characters to the text stream.

public override void Write(char[] buffer, int index, int count)
Parameters
buffer char[]
The character array to write data from.
index int
Starting index in the buffer.
count int
The number of characters to write.

Writes the text representation of a Double to the text stream.

public override void Write(double value)
Parameters
value double
The double to write.

Writes the text representation of an integer to the text stream.

public override void Write(int value)
Parameters
value int
The integer to write.

Writes the text representation of an 8-byte integer to the text stream.

public override void Write(long value)
Parameters
value long
The 8-byte integer to write.

Write(object?)

IndentedTextWriter.cs

Writes the text representation of an object to the text stream.

public override void Write(object? value)
Parameters
value object?
The object to write.

Writes the text representation of a Single to the text stream.

public override void Write(float value)
Parameters
value float
The single to write.

Write(string?)

IndentedTextWriter.cs

Writes the specified string to the text stream.

public override void Write(string? value)
Parameters
value string?
The string to write.

Write(string, object?)

IndentedTextWriter.cs

Writes out a formatted string, using the same semantics as specified.

public override void Write(string format, object? arg0)
Parameters
format string
The formatting string.
arg0 object?
The object to write into the formatted string.

Write(string, object?, object?)

IndentedTextWriter.cs

Writes out a formatted string, using the same semantics as specified.

public override void Write(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.

Write(string, object?[])

IndentedTextWriter.cs

Writes out a formatted string, using the same semantics as specified.

public override void Write(string format, params object?[] arg)
Parameters
format string
The formatting string to use.
arg object?[]
The argument array to output.

WriteLine overloads

Writes a line terminator.

public override void WriteLine()

WriteLine(bool)

IndentedTextWriter.cs

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

public override void WriteLine(bool value)
Parameters
value bool
The Boolean to write.

WriteLine(char)

IndentedTextWriter.cs

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

public override void WriteLine(char value)
Parameters
value char
The character to write.

WriteLine(char[]?)

IndentedTextWriter.cs

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

public override void WriteLine(char[]? buffer)
Parameters
buffer char[]?
The character array to write.

WriteLine(char[], int, int)

IndentedTextWriter.cs

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

public override void WriteLine(char[] buffer, int index, int count)
Parameters
buffer char[]
The character array to write data from.
index int
Starting index in the buffer.
count int
The number of characters to write.

WriteLine(double)

IndentedTextWriter.cs

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

public override void WriteLine(double value)
Parameters
value double
The double to write.

WriteLine(int)

IndentedTextWriter.cs

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

public override void WriteLine(int value)
Parameters
value int
The integer to write.

WriteLine(long)

IndentedTextWriter.cs

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

public override void WriteLine(long value)
Parameters
value long
The 8-byte integer to write.

WriteLine(object?)

IndentedTextWriter.cs

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

public override void WriteLine(object? value)
Parameters
value object?
The object to write.

WriteLine(float)

IndentedTextWriter.cs

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

public override void WriteLine(float value)
Parameters
value float
The single to write.

WriteLine(string?)

IndentedTextWriter.cs

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

public override void WriteLine(string? value)
Parameters
value string?
The string to write.

WriteLine(string, object?)

IndentedTextWriter.cs

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

public override void WriteLine(string format, object? arg0)
Parameters
format string
The formatting string.
arg0 object?
The object to write into the formatted string.

WriteLine(string, object?, object?)

IndentedTextWriter.cs

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

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.

WriteLine(string, object?[])

IndentedTextWriter.cs

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

public override void WriteLine(string format, params object?[] arg)
Parameters
format string
The formatting string to use.
arg object?[]
The argument array to output.

WriteLine(uint)

IndentedTextWriter.cs

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

public override void WriteLine(uint value)
Parameters
value uint
A UInt32 to output.

WriteLineNoTabs(string)

IndentedTextWriter.cs

Writes the specified string to a line without tabs.

public void WriteLineNoTabs(string value)

Parameters

value string
The string to write.

Constants

NameDescription
DefaultTabStringSpecifies the default tab string. This field is constant.

DefaultTabString

Specifies the default tab string. This field is constant.

public const string DefaultTabString = "    "