I’m using a comboBox with an enum of Countries, and I wonder how I get the selected country from the comboBox to a string. Previously I have used cmbCountries.SelectedIndex to get the int number of the selected country, but now I want the text. Help is preciated! Thanks!
Share
If your combo box is data bound, then just use the index directly against the data.
If not, you can get the item from the control:
cmbCountries.SelectedItemBut if you want just the text value of the selected entry:
cmbCountries.Text