Credits: Paul Montgomery

To set a combo box ( or list box ) to all of the values in an enum, do the following.


this.ComboBox1.DataSource 
   = Enum.GetNames( typeof ( YourEnum ));

Then to get it back out.


YourEnum val 
   = (YourEnum) Enum.Parse(typeof(YourEnum)
          ,comboBox1.SelectedItem.ToString());