public static IAsyncResult BeginSort<TKeyFrom, TKeyTo, TValueFrom, TValueTo>(
CastArray<TKeyFrom, TKeyTo> keys,
CastArray<TValueFrom, TValueTo> values,
IComparer<TKeyTo>? comparer = null,
AsyncConfig? asyncConfig = null
)
where TKeyFrom : struct, new()
where TKeyTo : struct, new()
where TValueFrom : struct, new()
where TValueTo : struct, new()
Public Shared Function BeginSort(Of TKeyFrom As {Structure, New}, TKeyTo As {Structure, New}, TValueFrom As {Structure, New}, TValueTo As {Structure, New}) (
keys As CastArray(Of TKeyFrom, TKeyTo),
values As CastArray(Of TValueFrom, TValueTo),
Optional comparer As IComparer(Of TKeyTo) = Nothing,
Optional asyncConfig As AsyncConfig = Nothing
) As IAsyncResultpublic:
generic<typename TKeyFrom, typename TKeyTo, typename TValueFrom, typename TValueTo>
where TKeyFrom : value class, gcnew()
where TKeyTo : value class, gcnew()
where TValueFrom : value class, gcnew()
where TValueTo : value class, gcnew()
static IAsyncResult^ BeginSort(
CastArray<TKeyFrom, TKeyTo> keys,
CastArray<TValueFrom, TValueTo> values,
IComparer<TKeyTo>^ comparer = nullptr,
AsyncConfig^ asyncConfig = nullptr
)static member BeginSort :
keys : CastArray<'TKeyFrom, 'TKeyTo> *
values : CastArray<'TValueFrom, 'TValueTo> *
?comparer : IComparer<'TKeyTo> *
?asyncConfig : AsyncConfig
(* Defaults:
let _comparer = defaultArg comparer null
let _asyncConfig = defaultArg asyncConfig null
*)
-> IAsyncResult when 'TKeyFrom : struct, new() when 'TKeyTo : struct, new() when 'TValueFrom : struct, new() when 'TValueTo : struct, new()In .NET Framework 4.0 and above you can use also the SortAsync methods.
To get the result or the exception that occurred during the operation you have to call the EndSort method.
This method is not a blocking call even if the MaxDegreeOfParallelism property of the asyncConfig parameter is 1.
| ArgumentException | The IsNull property of values is and values has fewer elements than keys. |