日期:2014-05-20  浏览次数:21063 次

WinForm下如何遍历CheckBoxList?
很简单的一个问题!

------解决方案--------------------
for(int i =0;i<ChecklistBox.Items.count;i++)
{
MessageBox.Show(ChecklistBox.Items[0].ToString());
}
------解决方案--------------------
List<T> lst=new List<T>();
for(int i =0;i <ChecklistBox.Items.count;i++) 

if(ChecklistBox.Items[0].Selected)
lst.Add(List.ChecklistBox.Items[0]); 
}
或用foreach循环