Is there any way to see the source code for methods that are implemented externally in the .NET framework?
I know about Reference Source which is a great resource, however a lot of the core classes in the .NET framework are implemented externally (I assume in C++?).
For example I am very interested in the internal workings of of the class String but almost half of the methods are declared with the extern keyword including this[int index]
which appears to actually hold the characters in the string.
Where can I find the source code for String.this[int index]
or String.nativeCompareOrdinalEx(String strA, int indexA, String strB, int indexB, int count)
and other externally implemented methods?
Also, is there a particular reason why so much of the core framework classes are implemented externally? Is it so that they could utilize existing code or for performance reasons or something else?
String.nativeCompareOrdinalEx
it is mapped toCOMString::CompareOrdinalEx
found here. Look at the external call list and try to find the function mapping. – mike z Nov 5 '15 at 17:25String.this[int index]
? – Jacob Schneider Nov 5 '15 at 17:41FCIntrinsic("get_Chars", COMString::GetCharAt, CORINFO_INTRINSIC_StringGetChar)
but that's just a guess. – mike z Nov 5 '15 at 17:42