The below code will help you to bind enum to combobox .
enum Mode
{
Cash,
credit
}
private void Form3_Load(object sender, EventArgs e)
{
comboBox1.DataSource = Enum.GetNames(typeof(Mode));
}
{
Cash,
credit
}
private void Form3_Load(object sender, EventArgs e)
{
comboBox1.DataSource = Enum.GetNames(typeof(Mode));
}
No comments:
Post a Comment