Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ImmutableHashSet::ToImmutableHashSet<TSource> Method (IEnumerable<TSource>^, IEqualityComparer<TSource>^)

 

Enumerates a sequence, produces an immutable hash set of its contents, and uses the specified equality comparer for the set type.

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

public:
generic<typename TSource>
[ExtensionAttribute]
static ImmutableHashSet<TSource>^ ToImmutableHashSet(
	IEnumerable<TSource>^ source,
	IEqualityComparer<TSource>^ equalityComparer
)

Parameters

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

The sequence to enumerate.

equalityComparer
Type: System.Collections.Generic::IEqualityComparer<TSource>^

The object to use for comparing objects in the set for equality.

Return Value

Type: System.Collections.Immutable::ImmutableHashSet<TSource>^

An immutable hash set that contains the items in the specified sequence and uses the specified equality comparer.

Type Parameters

TSource

The type of the elements in the sequence.

Return to top
Show:
© 2017 Microsoft