Skip to content

格式

typescript
HashSet.Clear()

所属类: HashSet

描述

清除集合中的元素。

参数

参数名类型描述

返回值

类型描述
void

代码示例

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

myHashSet.Clear();