i have an asp.net-mvc webpage and i want to show a dropdown list that is based off an enum. I want to show the text of each enum item and the id being the int value that the en
Now I used Tuple but you can convert this to use anything:
Tuple
var values = Enum.GetValues(typeof(DayOfWeek)) .Cast() .Select(d => Tuple.Create(((int)d).ToString(), d.ToString())) .ToList()