ImmutableHashSet 类
定义
针对 ImmutableHashSet<T> 类的实例提供一组初始化方法。Provides a set of initialization methods for instances of the ImmutableHashSet<T> class.
NuGet package: System.Collections.Immutable(关于不可变集合和安装方法)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
- 继承
-
ImmutableHashSet
方法
| Create<T>() |
创建一个空的不可变哈希集。Creates an empty immutable hash set. |
| Create<T>(IEqualityComparer<T>) |
创建使用指定相等性比较器的空不可变哈希集。Creates an empty immutable hash set that uses the specified equality comparer. |
| 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[]) |
创建一个包含指定集合中的项并为集类型使用指定相等性比较器的新不可变哈希集。Creates a new immutable hash set that contains the items in the specified collection and uses the specified equality comparer for the set type. |
| Create<T>(T) |
创建包含指定项的新不可变哈希集。Creates a new immutable hash set that contains the specified item. |
| Create<T>(T[]) |
创建包含指定项数组的新不可变哈希集。Creates a new immutable hash set that contains the specified array of items. |
| CreateBuilder<T>() |
创建一个新的不可变哈希集生成器。Creates a new immutable hash set builder. |
| CreateBuilder<T>(IEqualityComparer<T>) |
创建一个新的不可变哈希集生成器。Creates a new immutable hash set builder. |
| CreateRange<T>(IEnumerable<T>) |
创建已预先填充了指定项的新不可变哈希集。Creates a new immutable hash set prefilled with the specified items. |
| 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>) |
枚举序列,并生成其内容的不可变哈希集。Enumerates a sequence and produces an immutable hash set of its contents. |
| 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. |
| ToImmutableHashSet<TSource>(ImmutableHashSet<TSource>.Builder) |
从生成器集的当前内容创建不可变哈希集。Creates an immutable hash set from the current contents of the builder's set. |
适用于
线程安全性
此类型是线程安全的。This type is thread safe.