TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mark c
NA
14
48.5k
For loop is exited before completion
Mar 1 2011 10:31 PM
[code]for (int d = 0; d <= checkedListBox1.Items.Count -1; d++)
{
if (checkedListBox1.GetItemChecked(d) == true)
{
checkedListBox1.Items.RemoveAt(d);
}
}[/code]
The for loop is completed before it's suppose to end... Why is this? I checked all the items (~20) in the checkedListBox, but when I run this code, not all the items are removed; some are left over. Why is this? I even tried removing if(checkedListBox1.GetItemChecked).
Reply
Answers (
3
)
XML
Searching within files