ImmutableHashSet ImmutableHashSet ImmutableHashSet ImmutableHashSet Class

Definition

Provides a set of initialization methods for instances of the ImmutableHashSet<T> class.

NuGet package: System.Collections.Immutable (about immutable collections and how to install)

public ref class ImmutableHashSet abstract sealed
public static class ImmutableHashSet
type ImmutableHashSet = class
Public Module ImmutableHashSet
Inheritance
ImmutableHashSetImmutableHashSetImmutableHashSetImmutableHashSet

Methods

Create<T>() Create<T>() Create<T>() Create<T>()

Creates an empty immutable hash set.

Create<T>(IEqualityComparer<T>) Create<T>(IEqualityComparer<T>) Create<T>(IEqualityComparer<T>) Create<T>(IEqualityComparer<T>)

Creates an empty immutable hash set that uses the specified equality comparer.

Create<T>(T) Create<T>(T) Create<T>(T) Create<T>(T)

Creates a new immutable hash set that contains the specified item.

Create<T>(T[]) Create<T>(T[]) Create<T>(T[]) Create<T>(T[])

Creates a new immutable hash set that contains the specified array of items.

Create<T>(IEqualityComparer<T>, T) Create<T>(IEqualityComparer<T>, T) Create<T>(IEqualityComparer<T>, T) Create<T>(IEqualityComparer<T>, T)

Creates a new immutable hash set that contains the specified item and uses the specified equality comparer for the set type.

Create<T>(IEqualityComparer<T>, T[]) Create<T>(IEqualityComparer<T>, T[]) Create<T>(IEqualityComparer<T>, T[]) Create<T>(IEqualityComparer<T>, T[])

Creates a new immutable hash set that contains the items in the specified collection and uses the specified equality comparer for the set type.

CreateBuilder<T>() CreateBuilder<T>() CreateBuilder<T>() CreateBuilder<T>()

Creates a new immutable hash set builder.

CreateBuilder<T>(IEqualityComparer<T>) CreateBuilder<T>(IEqualityComparer<T>) CreateBuilder<T>(IEqualityComparer<T>) CreateBuilder<T>(IEqualityComparer<T>)

Creates a new immutable hash set builder.

CreateRange<T>(IEnumerable<T>) CreateRange<T>(IEnumerable<T>) CreateRange<T>(IEnumerable<T>) CreateRange<T>(IEnumerable<T>)

Creates a new immutable hash set prefilled with the specified items.

CreateRange<T>(IEqualityComparer<T>, IEnumerable<T>) CreateRange<T>(IEqualityComparer<T>, IEnumerable<T>) CreateRange<T>(IEqualityComparer<T>, IEnumerable<T>) CreateRange<T>(IEqualityComparer<T>, IEnumerable<T>)

Creates a new immutable hash set that contains the specified items and uses the specified equality comparer for the set type.

ToImmutableHashSet<TSource>(IEnumerable<TSource>) ToImmutableHashSet<TSource>(IEnumerable<TSource>) ToImmutableHashSet<TSource>(IEnumerable<TSource>) ToImmutableHashSet<TSource>(IEnumerable<TSource>)

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

ToImmutableHashSet<TSource>(ImmutableHashSet<TSource>) ToImmutableHashSet<TSource>(ImmutableHashSet<TSource>) ToImmutableHashSet<TSource>(ImmutableHashSet<TSource>) ToImmutableHashSet<TSource>(ImmutableHashSet<TSource>)

Creates an immutable hash set from the current contents of the builder's set.

ToImmutableHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>) ToImmutableHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>) ToImmutableHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>) ToImmutableHashSet<TSource>(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.

Applies to

Thread Safety

This type is thread safe.