共用方式為


IndentedTextWriter 建構函式

定義

使用指定的文字寫入器和預設的定位點字串,來初始化 IndentedTextWriter 類別的新執行個體。

多載

IndentedTextWriter(TextWriter)

使用指定的文字寫入器和預設的定位點字串,來初始化 IndentedTextWriter 類別的新執行個體。

IndentedTextWriter(TextWriter, String)

使用指定的文字寫入器和定位點字串來,初始化 IndentedTextWriter 類別的新執行個體。

IndentedTextWriter(TextWriter)

來源:
IndentedTextWriter.cs
來源:
IndentedTextWriter.cs
來源:
IndentedTextWriter.cs

使用指定的文字寫入器和預設的定位點字串,來初始化 IndentedTextWriter 類別的新執行個體。

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)

參數

writer
TextWriter

用來輸出的 TextWriter

另請參閱

適用於

IndentedTextWriter(TextWriter, String)

來源:
IndentedTextWriter.cs
來源:
IndentedTextWriter.cs
來源:
IndentedTextWriter.cs

使用指定的文字寫入器和定位點字串來,初始化 IndentedTextWriter 類別的新執行個體。

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)

參數

writer
TextWriter

用來輸出的 TextWriter

tabString
String

用來縮排的定位點字串。

範例

下列程式代碼範例示範如何使用指定的索引標籤字串來建立 IndentedTextWriter

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

另請參閱

適用於