Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2014
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. private void PopulateComboBoxWithEnum(ComboBox cb, Type enumType)
  2. {
  3. foreach (var name in enumType.GetEnumNames())
  4. {
  5. cb.Items.Add(name);
  6. }
  7. }
  8.  
  9. call:
  10. PopulateComboBoxWithEnum(combobox1, typeof(MyEnum));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement