Skip to content

format

typescript
HashSet.count

class: HashSet

description

The number of elements in the collection.

parameter

param_nametypedescription

reture

typedescription
number

code example

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

let count = myHashSet.count;
Debug.Log("There are", count, "elements in the collection");