Skip to content

格式

typescript
HashSet.Remove(item)

所属类: HashSet

描述

移除集合中的元素。

参数

参数名类型描述
itemT|null元素值

返回值

类型描述
void

代码示例

typescript
let myHashSet  = new HashSet<String>(String);
//添加元素到 myHashSet
myHashSet.Add("apple");
myHashSet.Add("banana");
myHashSet.Add("orange");
//移除元素"apple"
myHashSet.Remove("apple");