Skip to content

format

typescript
HashSet.Add(item)

class: HashSet

description

Add an element to the collection.

parameter

param_nametypedescription
itemT|nullThe value of the element.

reture

typedescription
void

code example

typescript
let myHashSet  = new HashSet<String>(String);
// Add elements to myHashSet
myHashSet.Add("apple");
myHashSet.Add("banana");
myHashSet.Add("orange");