简体   繁体   中英

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 eg 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

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: 在此处输入图片说明

and click view disassembly.

String.cs can be seen here:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM