IndentedTextWriter Costruttori

Definizione

Inizializza una nuova istanza della classe IndentedTextWriter utilizzando il writer di testo specificato e la stringa di tabulazioni predefinita.

Overload

IndentedTextWriter(TextWriter)

Inizializza una nuova istanza della classe IndentedTextWriter utilizzando il writer di testo specificato e la stringa di tabulazioni predefinita.

IndentedTextWriter(TextWriter, String)

Inizializza una nuova istanza della classe IndentedTextWriter utilizzando il writer di testo e la stringa di tabulazioni specificati.

IndentedTextWriter(TextWriter)

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

Inizializza una nuova istanza della classe IndentedTextWriter utilizzando il writer di testo specificato e la stringa di tabulazioni predefinita.

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)

Parametri

writer
TextWriter

Oggetto TextWriter da utilizzare per l'output.

Vedi anche

Si applica a

IndentedTextWriter(TextWriter, String)

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

Inizializza una nuova istanza della classe IndentedTextWriter utilizzando il writer di testo e la stringa di tabulazioni specificati.

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)

Parametri

writer
TextWriter

Oggetto TextWriter da utilizzare per l'output.

tabString
String

Stringa di tabulazioni da utilizzare per il rientro.

Esempio

Nell'esempio di codice seguente viene illustrata la creazione di un IndentedTextWriter oggetto utilizzando una stringa di tabulazione specificata.

// 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, "    ")

Vedi anche

Si applica a