Export (0) Print
Expand All

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

Enumerates a sequence and produces an immutable sorted set of its contents.

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

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

Type Parameters

TSource

The type of the elements in the sequence.

Parameters

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

The sequence to enumerate.

Return Value

Type: System.Collections.Immutable.ImmutableSortedSet<TSource>
An immutable sorted set that contains the items in the specified sequence.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<TSource>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Show:
© 2015 Microsoft