IndentedTextWriter Constructores

Definición

Inicializa una nueva instancia de la clase IndentedTextWriter utilizando el escritor de texto especificado y la cadena de tabulación predeterminada.

Sobrecargas

IndentedTextWriter(TextWriter)

Inicializa una nueva instancia de la clase IndentedTextWriter utilizando el escritor de texto especificado y la cadena de tabulación predeterminada.

IndentedTextWriter(TextWriter, String)

Inicializa una nueva instancia de la clase IndentedTextWriter utilizando el escritor de texto y la cadena de tabulación especificados.

IndentedTextWriter(TextWriter)

Inicializa una nueva instancia de la clase IndentedTextWriter utilizando el escritor de texto especificado y la cadena de tabulación predeterminada.

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)

Parámetros

writer
TextWriter

TextWriter que se va a utilizar para los resultados.

Consulte también

Se aplica a

IndentedTextWriter(TextWriter, String)

Inicializa una nueva instancia de la clase IndentedTextWriter utilizando el escritor de texto y la cadena de tabulación especificados.

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)

Parámetros

writer
TextWriter

TextWriter que se va a utilizar para los resultados.

tabString
String

Cadena de tabulación que se va a utilizar para aplicar sangrías.

Ejemplos

En el ejemplo de código siguiente se muestra cómo crear un IndentedTextWriter mediante una cadena de tabulación especificada.

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

Consulte también

Se aplica a