Decompilation and other neat tricks
So, how do you find out that StringBuilder doubles its capacity when it needs more space?
For that matter, how do you find out how the Framework classes work?
If you're serious about .NET programming, you'll often need to understand exactly how a class is doing what it's doing. Yes OO is all about little boxes of code that we manage on the periphery, but as hardcore developers, all of us at sometime need to crack open the boxes and start pulling out wires.
The Rotor source is really useful for certain base libraries. Rotor doesn't cover the entire base of the BCL, but it has most classes. Plus, as it's source you don't have the problem with decompilers (more later).
Dave Wanta has put the Rotor source on 123ASPX. It's here. Try StringBuilder and look for GetNewString(). (Microsoft - seriously, no comments on your private methods?!)
Dave - if I had one hint for you - put up a bunch of redirection pages up on your site so that we can just go to a class, e.g. http://www.123aspx.com/rotor/System/Text/StringBuilder.
The other trick is to use a decompiler. I used to be all over Anakrino, and although I still am, I'm finding myself using the decompiler in the latest rev of Reflector.