Today someone posted on a list I'm on about how it would be cool if you could data bind an Enum to a ComboBox.
Well, you can. Assuming the following Enum:
Public Enum MyEnum
[Me]
Myself
Irene
End Enum
You could use this code to bind it:
Me.ComboBox1.DataSource = System.Enum.GetValues(GetType(MyEnum))
Here's the code in C#:
public
enum MyEnum
{
Me, MySelf, Irene
}
this
.comboBox1.DataSource = System.Enum.GetValues(typeof(MyEnum));
Enjoy.
End of line.