Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IndentedTextWriter::Indent Property

 

Gets or sets the number of spaces to indent.

Namespace:   System.CodeDom.Compiler
Assembly:  System (in System.dll)

public:
property int Indent {
	int get();
	void set(int value);
}

Property Value

Type: System::Int32

The number of spaces to indent.

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

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft