C# – Enums

Adding Enum Values to ComboBox


Converting String to Enum

importants ipt =  (importants)System.ComponentModel.TypeDescriptor.GetConverter(typeof(importants)).ConvertFromString(comboBox1.SelectedItem.ToString());


importantsipt = (importants)System.Enum.Parse(typeof(importants), comboBox1.SelectedItem.ToString());

Getting values from Enum

foreach(int i in Enum.GetValues(typeof(importants))){

4 Replies to “C# – Enums”

  1. i’m also firefox user.. my blog are working very fine in both firefox and ie.

    could u plz send me a screenshot if you are not able to view my page in firefox? Thanks.

  2. I’m too having Problems with viewing this Page (IE7)

    the lines of code are not Wrapped, it’s a One Long line overlaying the Links panels on the right.
    Thanks for the Code!

Leave a Reply