简体   繁体   中英

Add items to comboBox

So I am trying to add items to a comboBox like this (the comboBox itself looks fine; it appears on screen and everything):

people_comboBox.Items.Add("Present");
people_comboBox.Items.Add("Late");
people_comboBox.Items.Add("Absent");

It only comes up with one item, which is "System.String[]".

What am I doing wrong?

尝试使用这些值创建字符串列表或字符串数​​组,然后将ComboBox的.DataSource属性设置为此集合。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM