I have a simple class called Tuple. which looks like this :
class tuple
{
string name;
string code
}
i inserted few of these items into a combobox, now when i want to select through the code some item, i try to write
myComboBox.selectedItem = new tuple("Hello" , "5");
and of course it doesn't work at all and the selected item doesn't change.
let's assume the items list of the combobox contains an item that looks like this, how can he compare the items ?
i inherited iComparable and implemented it, but unfortunately he doesn't use it at all..
how can i set the selected item ? should i run an all the items with a loop and compare them by myself ?
thanks