📜  c# 一维字典 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:20.344000             🧑  作者: Mango

代码示例1
// 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);