I have a simple comboBox with some Value/Text items in it. I have using ComboBox.DisplayMember and ComboBox.ValueMember to correctly set the value/text. When I try to get th
To avoid having to create a new class for all your comboboxes I would suggest you just use a KeyValuePair like in the following example:
cbPlayer1.ValueMember = "Value";
cbPlayer1.DisplayMember = "Key";
cbPlayer1.DataSource = new List>()
{new KeyValuePair("3","This should have the value of 3")};
You still need to cast the selected value
string selectedValue = (string)cbPlayer1.SelectedValue;
MessageBox.Show(selectedValue);