Thursday, February 23, 2006

System.Console in .NET 2.0

I like to use the Console to do small test applications and it bothered me how limited it is. E.g., I have not been able to control where to place the text in the console window. In .NET 2.0 the Console class has now been much updated, e.g., there is the great new function SetCursorPosition() :)

Another missing functionality in the Console 1.0 class is a non-blocking Peak(). This is useful as a condition in a while-loop (instead of spawning a second thread that blocks on Peak() or Read()). In version 2.0 there is now the KeyAvailable property that (supposedly) serves this purpose.

This is just to mention two of the many additions to the Control class.

No comments: