中文
Appearance
HashSet.count
HashSet
集合中的元素数。
number
let myHashSet = new HashSet<String>(String); //添加元素到 myHashSet myHashSet.Add("apple"); myHashSet.Add("banana"); myHashSet.Add("orange"); let count = myHashSet.count; Debug.Log("集合中一共有", count, "个元素");