📜  将枚举转换为键值 - C# 代码示例

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

代码示例2
string[] names = Enum.GetNames(typeof(Translation));

Hashtable hashTable = new Hashtable();
for (int i = 0; i < names.Length; i++)
{
    hashTable[i + 1] = names[i];
}