currently i have combobox in my win forms application and, just for test i made a loop so it adds 10 items, but all 10 items in combobox are same!
here is my loop in main class: `
void AddValue(){
ComboboxItem item = new ComboboxItem();
for (int i = 0; i < 10; i++)
{
item.Text = "Item " + i;
item.Value = i;
ModDown.Items.Add(item);
}
}
and ComboboxItem class: `
class ComboboxItem
{
public string Text { get; set; }
public int Value { get; set; }
public override string ToString()
{
return Text;
}
}
thanks for any help!
- Nick.