14 August 2012

Add Enum value into ComboBox

Here , I will give a Small Code for Add Enum Value into ComboBox using C#.net.

First We create Enum Method using Enum Keyword:

enum days
    {
        Monday=1,
        Friday,
       Sunday
   }

Add a enum value into ComboBox box.
Add this code in the Form loading or button click event or any where...

comboBox1.Items.Add(days.Friday);
comboBox1.Items.Add(days.Monday );
comboBox1.Items.Add(days.Sunday);

No comments: