Share via


IndentedTextWriter Konstruktory

Definice

Inicializuje novou instanci IndentedTextWriter třídy pomocí zadaného zapisovače textu a výchozího řetězce tabulátoru.

Přetížení

IndentedTextWriter(TextWriter)

Inicializuje novou instanci IndentedTextWriter třídy pomocí zadaného zapisovače textu a výchozího řetězce tabulátoru.

IndentedTextWriter(TextWriter, String)

Inicializuje novou instanci IndentedTextWriter třídy pomocí zadaného zapisovače textu a řetězce tabulátoru.

IndentedTextWriter(TextWriter)

Zdroj:
IndentedTextWriter.cs
Zdroj:
IndentedTextWriter.cs
Zdroj:
IndentedTextWriter.cs

Inicializuje novou instanci IndentedTextWriter třídy pomocí zadaného zapisovače textu a výchozího řetězce tabulátoru.

public:
 IndentedTextWriter(System::IO::TextWriter ^ writer);
public IndentedTextWriter (System.IO.TextWriter writer);
new System.CodeDom.Compiler.IndentedTextWriter : System.IO.TextWriter -> System.CodeDom.Compiler.IndentedTextWriter
Public Sub New (writer As TextWriter)

Parametry

writer
TextWriter

Slouží TextWriter k použití pro výstup.

Viz také

Platí pro

IndentedTextWriter(TextWriter, String)

Zdroj:
IndentedTextWriter.cs
Zdroj:
IndentedTextWriter.cs
Zdroj:
IndentedTextWriter.cs

Inicializuje novou instanci IndentedTextWriter třídy pomocí zadaného zapisovače textu a řetězce tabulátoru.

public:
 IndentedTextWriter(System::IO::TextWriter ^ writer, System::String ^ tabString);
public IndentedTextWriter (System.IO.TextWriter writer, string tabString);
new System.CodeDom.Compiler.IndentedTextWriter : System.IO.TextWriter * string -> System.CodeDom.Compiler.IndentedTextWriter
Public Sub New (writer As TextWriter, tabString As String)

Parametry

writer
TextWriter

Slouží TextWriter k použití pro výstup.

tabString
String

Řetězec tabulátoru, který se má použít pro odsazení.

Příklady

Následující příklad kódu ukazuje vytvoření IndentedTextWriter pomocí zadaného řetězce tabulátoru.

// Creates a TextWriter to use as the base output writer.
System::IO::StringWriter^ baseTextWriter = gcnew System::IO::StringWriter;

// Create an IndentedTextWriter and set the tab string to use 
// as the indentation string for each indentation level.
System::CodeDom::Compiler::IndentedTextWriter^ indentWriter = gcnew IndentedTextWriter( baseTextWriter,"    " );
// Creates a TextWriter to use as the base output writer.
System.IO.StringWriter baseTextWriter = new System.IO.StringWriter();

// Create an IndentedTextWriter and set the tab string to use
// as the indentation string for each indentation level.
System.CodeDom.Compiler.IndentedTextWriter indentWriter = new IndentedTextWriter(baseTextWriter, "    ");
  ' Create a TextWriter to use as the base output writer.
  Dim baseTextWriter As New System.IO.StringWriter

  ' Create an IndentedTextWriter and set the tab string to use 
  ' as the indentation string for each indentation level.
  Dim indentWriter = New IndentedTextWriter(baseTextWriter, "    ")

Viz také

Platí pro