Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
世界のすべての国を含むコンボボックスがあります。私の質問は、プログラムの起動時にコンボボックスに「イングランド」が表示されるようにするにはどうすればよいかです。
以下のコードで国のインデックスを取得できることは知っていますが、選択した国を表示する方法がわかりません。
int index = cmbCountry.Items.IndexOf(address.Country);
cmbCountry.SelectedIndex = index;
cmbCountry.SelectedValue = "England";