One of the Oddest APIs I've Encountered in .NET

It's been there forever, so I wonder how I missed this until now:

var stream = Console.Out;
Console.SetOut(new StringWriter());

I have to use a property to get the value, but a method to set the value?


There has to be a sane reason why this was done this way. I mean, why not make the property writeable?

* Posted at 11.17.2008 09:07:54 PM CST | Link *

Blog History