tags:

views:

87

answers:

4

Is there a goto resource for finding the implementation details of various C# classes and methods? Please don't say Google/Yahoo/your favorite search engine. I am looking for one consistent resource.

Red Gate's .Net Reflector is usually pretty good, but I can't seem to find the implementation for any of System.Object's methods. (I was looking for the implementation of GetType() and GetHashCode(), for the curious.)

A: 

The Mono project is open source and you might want to look at it. While they may not match internals to the letter, their implementations should at least get you on the right track.

http://www.mono-project.com/Main_Page

Anthony Pegram
+3  A: 

Most of Mono was written in C#. Since they are replicating the runtime, and since they are open source, the provide implementations you can use, though they may not match that of .NET, so depending on why you want to know this, it may or may not serve.

Jon Hanna
+1  A: 

Check out the Shared Source CLI

Mark H
+1  A: 

The shared source CLI might be worth a look. It contains source code for the runtime and the framework. IIRC the code for those methods is implemented in C++.

Unfortunately it is not up-to-date with the latest version of .NET, but you can still pick up a wealth of knowledge by looking at the implementation.

The latest version of SSCLI is here.

Brian Rasmussen