I found out that inside the Array.Sort array,
[ReliabilityContract(Consistency.MayCorruptInstance, Cer.MayFail), SecurityCritical] [MethodImpl(MethodImplOptions.InternalCall)] private static extern bool TrySZSort(Array keys, Array items, int left, int right);
called out. Any ideas how this is implemented?
Any ideas how this is implemented?
This method is implemented in native code, inside the CLR itself. There are many methods like this on the kernel itself, low level types. For example, many of the methods System.Stringare not labeled InternalCall and are implemented in the runtime environment of a common language.
System.String
CLR SSCLI20 . 2005 2 CLR. .
, 7 , CLR. TrySZSort() , . clr/src/vm/ecall.cpp ArrayHelper:: TrySZSort(), ++, clr/src/vm/arrayhelpers.cpp
, ArrayHelpers<T>.QuickSort(), .
ArrayHelpers<T>.QuickSort()
, 52 . ++;)
, ++, # .