IndentedTextWriter Class
public sealed class IndentedTextWriter : TextWriterNo documentation is available.
- Inheritance
TextWriterIndentedTextWriter
Constructors
| Name | Description |
|---|---|
| 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.csInitializes a new instance of the IndentedTextWriter class using the specified text writer and default tab string.
public IndentedTextWriter(TextWriter writer)Parameters
writerTextWriter- The
TextWriterto use for output.
IndentedTextWriter(TextWriter, string)
IndentedTextWriter.csInitializes a new instance of the IndentedTextWriter class using the specified text writer and tab string.
public IndentedTextWriter(TextWriter writer, string tabString)Parameters
writerTextWriter- The
TextWriterto use for output. tabStringstring- The tab string to use for indentation.
Properties
| Name | Description |
|---|---|
| Encoding | Gets the encoding for the text writer to use. |
| Indent | Gets or sets the number of spaces to indent. |
| InnerWriter | Gets the TextWriter to use. |
| NewLine | Gets or sets the new line character to use. |
Encoding
IndentedTextWriter.csIndent
IndentedTextWriter.csInnerWriter
IndentedTextWriter.csNewLine
IndentedTextWriter.csMethods
| Name | Description |
|---|---|
| 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. |
Flush()
IndentedTextWriter.csFlushes the stream.
public override void Flush()Write overloads
Write(bool)
IndentedTextWriter.csWrite(char)
IndentedTextWriter.csWrite(char[]?)
IndentedTextWriter.csWrite(char[], int, int)
IndentedTextWriter.csWrite(double)
IndentedTextWriter.csWrite(int)
IndentedTextWriter.csWrite(long)
IndentedTextWriter.csWrite(object?)
IndentedTextWriter.csWrite(float)
IndentedTextWriter.csWrite(string?)
IndentedTextWriter.csWrite(string, object?)
IndentedTextWriter.csWrite(string, object?, object?)
IndentedTextWriter.csWrites out a formatted string, using the same semantics as specified.
Write(string, object?[])
IndentedTextWriter.csWriteLine overloads
WriteLine()
IndentedTextWriter.csWrites a line terminator.
public override void WriteLine()WriteLine(bool)
IndentedTextWriter.csWriteLine(char)
IndentedTextWriter.csWriteLine(char[]?)
IndentedTextWriter.csWriteLine(char[], int, int)
IndentedTextWriter.csWriteLine(double)
IndentedTextWriter.csWriteLine(int)
IndentedTextWriter.csWriteLine(long)
IndentedTextWriter.csWriteLine(object?)
IndentedTextWriter.csWriteLine(float)
IndentedTextWriter.csWriteLine(string?)
IndentedTextWriter.csWriteLine(string, object?)
IndentedTextWriter.csWriteLine(string, object?, object?)
IndentedTextWriter.csWrites out a formatted string, followed by a line terminator, using the same semantics as specified.
WriteLine(string, object?[])
IndentedTextWriter.csWriteLine(uint)
IndentedTextWriter.csWriteLineNoTabs(string)
IndentedTextWriter.csConstants
| Name | Description |
|---|---|
| DefaultTabString | Specifies the default tab string. This field is constant. |
DefaultTabString
Specifies the default tab string. This field is constant.
public const string DefaultTabString = " "