For each in CheckedListBox. returns as Object and not as Control

后端 未结 2 1031
北恋
北恋 2021-01-02 09:27

I have a CheckedListBox previously populated. I want to loop with a \"for each / next\" through all items in the CheckedListBox and do a lot of \"stuff\" with each iteration

2条回答
  •  一生所求
    2021-01-02 09:57

    For Each item In SuppliersCheckList.CheckedItems
            If SuppliersCheckList.GetItemCheckState(SuppliersCheckList.Items.IndexOf(item)) Then
                MsgBox(item.ToString)
            End If
    Next
    

提交回复
热议问题