C# ArrayList循环遍历ListBox
来源:互联网 发布:杨焕明 知乎 编辑:程序博客网 时间:2024/05/17 23:09
1 定义一个ArrayList对象,这个ArrayList对象后面要用
System.Collections.ArrayList m_list = new System.Collections.ArrayList();//
2 向listbox中添加元素
for (int i = 0; i < dt.Tables["[sheet1$]"].Rows.Count; i++)
{
this.listBox1.Items.Add(dt.Tables["[sheet1$]"].Rows[i][0].ToString());
}
3 循环遍历listbox中的items
for (int i = 0; i < this.listBox1.Items.Count; i++)//循环遍历listbox中的items
{
m_list.Add(this.listBox1.Items[i].ToString());
}
0 0
- C# ArrayList循环遍历ListBox
- ArrayList循环遍历
- C#控制台基础 用for循环遍历arraylist集合
- c# arrayList遍历
- List,ArrayList,Map循环遍历
- java怎么循环遍历ArrayList
- ArrayList循环遍历删除元素
- ArrayList循环遍历删除元素常见陷阱
- 遍历 listbox
- 遍历 listbox
- C# 遍历循环多维数组
- java:ArrayList循环遍历的俩种方法使用
- 遍历ArrayList,Iterator和for循环哪个更快?
- 遍历ArrayList,Iterator和for循环哪个更快? (转载)
- java ArrayList循环遍历并删除元素的常见陷阱
- ArrayList循环遍历并删除元素的常见陷阱
- ArrayList与LinkedList的普通for循环遍历
- 使用三种循环遍历ArrayList类型数组。
- c/c++常用算法(7) -- 基本算法思想
- MFC Activex VS2010
- Javascript selection的兼容性写法
- QFile和QTextStream配合使用
- # ## @#(字符串化操作符,粘接附,字符化操作符)
- C# ArrayList循环遍历ListBox
- android 微信朋友圈 中 回复功能的实现 是怎么弄的呢?寻求帮助
- XML解析之——使用dom4j解析XML
- 用xib文件自定义UIview的实现
- POJ 1426 Find The Multiple
- python模块学习---mechanize(模拟浏览器)
- Reactor模式,或者叫反应器模式
- 记
- 两个郁闷的异常: java.lang.StackOverflowError和java.net.SocketException: Broken pipe