KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How to convert Enum to Key,Value Pairs. I have converted it in C# 3.0 . public enum Translation { English, Russian, French, German } string[] trans = Enum.GetNames(typeof(Translation)); var v = trans.Select((value, key) => new { value, key }).ToDictionary(x => x.key + 1, x => x.value); In C# 1.0 What is the way to do so?
Tags (comma-separated)
Save Edits
Cancel