IndentedTextWriter.Indent Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the number of spaces to indent.
public:
property int Indent { int get(); void set(int value); };
public int Indent { get; set; }
member this.Indent : int with get, set
Public Property Indent As Integer
Property Value
The number of spaces to indent.
Examples
The following code example demonstrates setting the indentation level of an IndentedTextWriter. The indentation level is the number of tab strings to prefix each line with.
// 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, " ")
Applies to
Samarbeta med oss på GitHub
Källan för det här innehållet finns på GitHub, där du även kan skapa och granska ärenden och pull-begäranden. Se vår deltagarguide för mer information.