ComboBox in winforms C# | SoloLearn: Learn to code for FREE!


ComboBox in winforms C#

Hello, I need to fill combo box with four option // Fill the season_cb combo box with option season_cb.Items.Insert(0, "Season 1"); season_cb.Items.Insert(1, "Season 2"); season_cb.Items.Insert(2, "Season 3"); season_cb.Items.Insert(3, "Season 4"); season_cb.SelectedIndex = 0; Now I need the selected text MessageBox.Show(season_cb.SelectedText); This gives me " ". please tell me the proper syntax. Advance thanks!

12/3/2017 11:43:51 AM

Salman Mushtaq

2 Answers

New Answer

+2 season_cb.SelectedItem.ToString (); SelectedText is the text that you mark when you want to copy something


@sneeze, thanks Its work fine