我想從checkedListBox
項目變爲List<>
,但沒有選擇所有/全部取消選擇(第一個複選框)..不知道如何添加第一項.. 這是代碼:循環通過checkedListBox項目沒有選擇所有項目
foreach (string s in checkedListBoxDepts.CheckedItems)
{
if (checkedListBoxDepts.SelectedItems.IndexOf(s) == 0)
continue;
list.Add(s);
}
然後我拿物品,放在另一個列表,以避免錯誤:
foreach (string s in list)
{
list2.Add(s);
}
,但仍選擇所有加載...幫助
顯示烏爾checkedBoxList – tariq