1

I would like to look at the code for some of the classes in the .NET library. I find functions by using intellisense and just reading the tooltips that come up when I select different items.

One example is the Contains method that you can use on arrays to search for a given string. I just happened to stumble upon that while working on an exercise to learn. I'm assuming it's a simple method that just iterates through the array and checks for the string at each element.

If I wanted to take a look at this code, or code for any other class in .NET, how would I go about it? I have Visual Studio 2008.

3 Answers 3

10

Use .NET Reflector

Sign up to request clarification or add additional context in comments.

2 Comments

The one and only answer... basically ;)
Well, since the question asks for "code for any other class in .NET", the framework symbols or source will not help much. Also, looking at Rotor sources can be misleading since the actual BCL implementation may differ.
1

Either Reflector (for ease of use and universal application) or Microsoft's symbol server for the real thing.

Comments

0

Reflector is the way to go.

.NET Framework 3.5 BCL source code is available through debug symbols (reference license).

SSCLI (Rotor) and Mono source code can be relevant too.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.