📅  最后修改于: 2022-03-11 14:49:20.344000             🧑  作者: Mango
// constant searching similar to dictionary but not in key/value pair
// NOTE: value represents the key itself, you can't store equal values
HashSet constantSearch = new HashSet();
var getValue = constantSearch[value as key];
// example
var usedNumbers = new HashSet();
usedNumbers.Constains(number);
//
var registeredUsers = new HashSet();
registeredUsers.Constains(userName);