I have an enum, example:
enum MyEnum
{
My_Value_1,
My_Value_2
}
With :
comboBox1.DataSource = Enum.GetValues(typeof(MyEnum)
I like Kelsey's answer although I would use another variable other than 'e' such as 'en' so the answer can be used in event handlers with less hassle; 'e' in event handlers tends to be the EventArgs
argument.
As for the LINQ and IEnumerable
approach, it seems to me to be more complex and difficult to adapt for non-WPF ComboBox
es with .NET 3.5