Click here to Skip to main content
15,891,529 members
Articles / Programming Languages / C#

A Drop-in Indented TextWriter in C#

Rate me:
Please Sign up or sign in to vote.
4.33/5 (6 votes)
23 Oct 2021Public Domain2 min read 7K   7  
A handy code snippet that can set indentation levels while rendering multipart documents with a TextWriter
This bit of code is useful for code formatting while doing code generation, for formatting "using" screens in console applications, and potentially for any situation where you might need to render a text based document in multiple parts with different indentation levels.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under A Public Domain dedication


Written By
United States United States
Just a shiny lil monster. Casts spells in C++. Mostly harmless.

Comments and Discussions