Friday, 01 September, 2006

Working with Console Screen Buffers in .NET

The second article in my series about making the full Windows Console API available to .NET programs has just been posted to DevSource.  This article, Working with Console Screen Buffers in .NET, describes screen buffers and their use.  Screen buffers allow you to pre-compose console output in an offscreen buffer and then make that buffer active--effectively redrawing an entire screen in a single operation.  The ConsoleScreenBuffer class that I developed also provides some much more flexible output methods that aren't available in the standard System.Console class.

Full source code for both articles, including many examples in C#, is available here.