IndentedTextWriter コンストラクタ (TextWriter, String)
テキスト ライタとタブ文字列を指定して、IndentedTextWriter クラスの新しいインスタンスを初期化します。
名前空間: System.CodeDom.Compiler
アセンブリ: System (system.dll 内)
構文
'宣言
Public Sub New ( _
writer As TextWriter, _
tabString As String _
)
'使用
Dim writer As TextWriter
Dim tabString As String
Dim instance As New IndentedTextWriter(writer, tabString)
public IndentedTextWriter (
TextWriter writer,
string tabString
)
public:
IndentedTextWriter (
TextWriter^ writer,
String^ tabString
)
public IndentedTextWriter (
TextWriter writer,
String tabString
)
public function IndentedTextWriter (
writer : TextWriter,
tabString : String
)
パラメータ
- writer
出力に使用する TextWriter。
- tabString
インデント幅として使用するタブ文字列。
使用例
指定したタブ文字列を使用して IndentedTextWriter を作成するコード例を次に示します。
' 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, " ")
// 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, " ");
// 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, " ");
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 2.0、1.1、1.0
参照
関連項目
IndentedTextWriter クラス
IndentedTextWriter メンバ
System.CodeDom.Compiler 名前空間
TextWriter