Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
132 views
in Technique[技术] by (71.8m points)

c# - Step through .NET Framework Source Code?

I wasn't sure how to word the question but I would like to step through code as it goes through the .NET classes/methods, etc.

Earlier I had asked about how to view the code for the classes in the .NET library and I ended up with .NET Reflector which I promptly downloaded. Now, as an example, I am looking for more info.

I have a method in my program that looks like:

public bool DoThisJob(string job)
{
  if (jobsICanDo.Contains(job))
           return true;
}

Where jobsICanDo is an array of strings containing the different jobs.

When I execute that code, the "Contains(job)" method, I would like to be able to step through the code as it goes all the way through .NET libraries and classes involved in returning the result.

In a nutshell, I am a noob and I want to understand how all the libraries work. I don't just want to accept that it works and move on.

My specific question is now that I have .NET Reflector and can view the code in all the .NET libraries is there a way for me to actually see this code in action and watch as my input traverses through the .NET libraries and classes?

EDIT There seems to be at least a bit of confusion over what, exactly, I am looking for. I set a breakpoint at the if (jobsICanDo.Contains(job)). I run my program and it does its thing and when it gets there it stops. When step into the next line of code it just returns true and keeps on going. What I want to do is see what that Contains method is doing just like the rest of my code.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...