Martin
Martin

Reputation: 25

C# - Visual Studio 2017 - Get actual code of predefined methods

I'm curious but I just couldn't find anything on a quick search.

How can I display how e.g String.Concat(String0, String1); is processed within the debugging? I'd be interessted in both the actual processor code (like assembler) and and the actually processed c# code (as if it was a self written method).

Thanks

Upvotes: 0

Views: 52

Answers (1)

tmaj
tmaj

Reputation: 34987

Official guide is at How to: Debug .NET Framework Source.

Quick way:

Options -> Debugging -> Enable .NET Framework source stepping.

Since you most likely don't have the sources set up you should see: enter image description here

and click view disassembly.

String.cs can be seen here:

https://referencesource.microsoft.com/#mscorlib/system/string.cs

Upvotes: 1

Related Questions