I have a .NET method which is marked as an "Internal Call", meaning that it is implemented within the CLR itself. Is there any way to locate the code for and/or decompile such a method?

  • You can just read the CLR, it is almost the same as Assembly. But you can give ILSpy a try. Not sure if it will work but give it a go. – Stolas Sep 6 '13 at 13:03
  • ILSpy will not work on internal calls, they are native methods. – Shaun Wilson Dec 19 '13 at 15:25
  • I might have misinterpreted your question, but you can browse trough the source of .NET, search on Stackoverflow. (also dotnetframework.org) – Dominik Antal Dec 30 '13 at 13:55

If you use the windbg sos extension you can step into the internal calls - which are unmanaged code. The documentation for using sos is a bit tricky to sort out IMO. This link is helpful for learning the sos commands: http://msdn.microsoft.com/en-us/library/bb190764(v=vs.110).aspx. To load SOS I use:

.loadby sos clr ; for .NET 4 and higher
.loadby sos mscorwks ; for .NET 2

However you have to wait until the .NET DLLs have been loaded before those commands work, so you either have to set a breakpoint or make sure the managed code has some kind of wait (for input or something else) to allow the process to load the .NET DLLs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.