如何添加列表框项目的所有值? [英] How to add all value of listbox items?
本文介绍了如何添加列表框项目的所有值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我想添加listobox的所有值.我不希望物品计数.
谢谢.
Hello,
I want to add all values of listobox. I do not want items count.
Thank you.
推荐答案
尝试:
string currItemValue = string.Empty;
for(int i=0;i < myList.Items.Count ; i++)
{
currItemValue = myList.Items[i].Value;
// Do whatever you need to do with the current item value.
}
这篇关于如何添加列表框项目的所有值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文