C#:ListBox的2个常用方法Add,Clear与Items的2个属性

来源:互联网 发布:java ee 李刚 编辑:程序博客网 时间:2024/06/17 03:12
listBox1.Items.Clear()           清除listBox中的item;
listBox1.Items.Count            获取listBox的item数目;
listBox1.Items[n]                   获取listBox中的第n个item;
listBox1.Items.Add("123")   向listBox中添加一个item;