Internal implementation of .NET 4.0 kind

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?

+5
source share
2 answers

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.

+3
source

CLR SSCLI20 . 2005 2 CLR. .

, 7 , CLR. TrySZSort() , . clr/src/vm/ecall.cpp ArrayHelper:: TrySZSort(), ++, clr/src/vm/arrayhelpers.cpp

, ArrayHelpers<T>.QuickSort(), .

, 52 . ++;)

, ++, # .

+11

All Articles