System.CodeDom.Compiler.IndentedTextWriter Class

Provides a text writer that can indent new lines by a tab string token.

See Also: IndentedTextWriter Members


public class IndentedTextWriter : System.IO.TextWriter


System.CodeDom.Compiler.IndentedTextWriter extends a System.IO.TextWriter by providing methods that insert a tab string and track the current indentation level. Text formatted with multiple indentation levels is useful for generated code, so this class is used by CodeDOM code generator implementations.

The tab string is the string that each indentation consists of. Typically the tab string contains white space.


This class contains a link demand and an inheritance demand at the class level that applies to all members. A System.Security.SecurityException is thrown when either the immediate caller or the derived class does not have full-trust permission. For details about security demands, see Link Demands and Inheritance Demands.


Namespace: System.CodeDom.Compiler
Assembly: System (in System.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0,,