listbox iterating
C#
2
Posts
2
Posters
0
Views
1
Watching
-
how do I iterate through each item in the listbox using the foreach command? I can't figure out the variable name or type for each listbox item. do you have any ideas? Thanks, Stephen
foreach(object oLB in listBox1.Items) Because a listbox can define the value member of any object to display, it contains objects. Use something more specific assuming that you know what's in there. Christian Graus - Microsoft MVP - C++