I have a combo box that is populated with an Arraylist, like below. If I have another instance of same object, how do I select that object in the combobox? Please look at the code below to understand.
MakeEntity selectedMake = Make.GetMakeByTitle("Honda");
List<MakeEntity> allMakes = Make.GetAllMakes();
cbVehicleMake.DataSource = allMakes;
cbVehicleMake.SelectedIndex = cbVehicleMake.Items.IndexOf(selectedMake);
But last line is not working as expected. Can I get it to run at all or am I going in the wrong direction? Should MakeEntity implement iComparable?
Assuming MakeEntity has an property called id!