Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

convert enum to keyvalue

var dict = new Dictionary<int, string>();
foreach (var name in Enum.GetNames(typeof(Translation)))
{
    dict.Add((int)Enum.Parse(typeof(Translation), name), name);
}
Comment

convert enum to keyvalue

string[] names = Enum.GetNames(typeof(Translation));

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

PREVIOUS NEXT
Code Example
Csharp :: class merging 
Csharp :: hur delar man upp en e post på string c# 
Csharp :: remove multiple element on list from index a to b C# 
Csharp :: GridViewColumn url wpf 
Csharp :: c# ? behind variable 
Csharp :: C# calling method name 
Csharp :: text mesh pro 
Csharp :: unity player movement script 3d 
Csharp :: ask int text c# 
Csharp :: SendFileAsync discord 
Csharp :: C# resize window without title bar 
Csharp :: unknown discriminator value mongodb 
Csharp :: c# short 
Csharp :: visibility bound to radio button wpf 
Csharp :: unrecognized escape sequence c# connection string 
Csharp :: how to detect when a gameobject has exited a trigger c# 
Csharp :: C# declare object with values 
Csharp :: c# convert timestamp to datetime 
Csharp :: youtube unity 2d intercept 
Csharp :: c# deeply related children 
Csharp :: Request ID: XPBBR4XG1UWuX6fWF08_-jzYkrommVJjO7Os50CTYuZmiw7kMsFUkw== 
Csharp :: asp net route attribute vs httpget 
Csharp :: dispathcer in wpf stack overflow 
Csharp :: asp.net issue 
Csharp :: delay seconds in unity 
Csharp :: sterge element din coada c# 
Csharp :: trimend c# 
Csharp :: gersener waves 
Csharp :: range to 01 
Csharp :: log4net.dll 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =