问题
How can I get the number of items listed in a combobox?
回答1:
Try
var count = comboBox.Items.Count;
回答2:
You should reference Count of the Items property.
myComboBox.Items.Count
回答3:
comboBox.Items.Count;
Doesn't work for me.
I use :
comboBox->count();
来源:https://stackoverflow.com/questions/768513/how-to-get-the-number-of-items-in-a-combobox