views:

89

answers:

5

Where can I download source code for the .NET Framework? I mean sources of libraries. I need the source for reflection methods like invoke and other.

A: 

I don't think you can.
But you can use reflector to analyze the code.

Itay
A: 

Use RedGates .NET Reflector with it comes a perfectly good dissassambler which can produce code for you, it even creates the files for you.

Filip Ekberg
A: 

Your question isn't entirely clear, but if you need examples on how to use reflection:

The following open-source projects contain a lot of reflection code:

Philippe Leybaert
+1  A: 

You can set up symbols in Visual Studio to automatically be able to step in the framework code, or use .NET Mass Downloader to download all the source files in one pass.

Julien Lebosquain
+4  A: 

As stated by others you can use reflector and ILDASM to get the source of the framework code, however you should first visit http://referencesource.microsoft.com and download the reference source that MS has released. There is a tool on codeplex called netmassdownloader that makes it easy to download.

I've done this with all the frameworks since 3.5

Preet Sangha
Thanks a lot :) .
jitm