ToImmutableSortedSet(TSource) Method (IEnumerable(TSource), IComparer(TSource))
Collapse the table of content
Expand the table of content

ImmutableSortedSet.ToImmutableSortedSet<TSource> Method (IEnumerable<TSource>, IComparer<TSource>)

 

Enumerates a sequence, produces an immutable sorted set of its contents, and uses the specified comparer.

Namespace:   System.Collections.Immutable
Assembly:  System.Collections.Immutable (in System.Collections.Immutable.dll)

public static ImmutableSortedSet<TSource> ToImmutableSortedSet<TSource>(
	this IEnumerable<TSource> source,
	IComparer<TSource> comparer
)

Parameters

source
Type: System.Collections.Generic.IEnumerable<TSource>

The sequence to enumerate.

comparer
Type: System.Collections.Generic.IComparer<TSource>

The comparer to use for initializing and adding members to the sorted set.

Return Value

Type: System.Collections.Immutable.ImmutableSortedSet<TSource>

An immutable sorted set that contains the items in the specified sequence.

Type Parameters

TSource

The type of the elements in the sequence.

Return to top
Show:
© 2016 Microsoft