Home »

How can you check/uncheck all items in the CheckedListBox control in .NET 4.0?

Question ListCategory: VB.NETHow can you check/uncheck all items in the CheckedListBox control in .NET 4.0?
jeanderson295 author asked 8 years ago
1 Answers
shah_kajal184 author answered 8 years ago

To check all items in .NET, you can use the following code snippet: Code for VB: Dim i as Integer For i = 0 To myCheckedListBox.Items.Count – 1 myCheckedListBox.SetItemChecked(i, True) Next Code for C#: for( int i = 0; i < myCheckedListBox.Items.Count; i++ ) { myCheckedListBox.SetItemChecked(i, true); }

Please login or Register to Submit Answer