使用英语阅读

通过


HashSet<T>.AlternateLookup<TAlternate> 结构

定义

提供一种类型,可用于使用 TAlternate 而不是 THashSet<T> 执行操作。

C#
public readonly struct HashSet<T>.AlternateLookup<TAlternate>

类型参数

T
TAlternate

用于执行查找的备用实例类型。

继承
HashSet<T>.AlternateLookup<TAlternate>

属性

Set

获取此实例对其执行操作的 HashSet<T>

方法

Add(TAlternate)

将指定的元素添加到集。

Contains(TAlternate)

确定集是否包含指定的元素。

Remove(TAlternate)

从集中删除指定的元素。

TryGetValue(TAlternate, T)

搜索集合中的给定值,并返回其查找的等值(如果有)。

适用于

产品 版本
.NET 9