Version:
ToSortedSet<TSource>(System.Collections.Generic.IEnumerable<TSource> source, System.Collections.Generic.IComparer<TSource> comparer) Method
Creates a sorted set from the specified source using the specified equality comparer.
Syntax
public
static
SortedSet<TSource> ToSortedSet<TSource>(IEnumerable<TSource> source, IComparer<TSource> comparer)
Parameters
- source
- Type: System.Collections.Generic.IEnumerable<TSource>
The source enumeration.
- comparer
- Type: System.Collections.Generic.IComparer<TSource>
The comparer to use.
Returns
Set created from the source elements.
Exceptions
System.ArgumentNullException
|
source is null (Nothing in Visual Basic).
|