-
September 12th, 2011, 06:07 PM
#1
For loop not iterating through a list box
I have a listbox filled with several items. I want my program to go down the list and to each item in the listbox do the same action it did for the one above. The code I have goes down the list but it only performs the action for the first item then just goes down the list not doing the action for the other items.
This is my code:
for (int i = 0; i < numericUpDown2.Value; i++)
{
listBox4.SetSelected(i, true);
listBox4.SelectedItem.ToString();
listBox5.SetSelected(i, true);
createaccount();
}
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|