ListBox
C#
3
Posts
3
Posters
0
Views
1
Watching
-
hi, How do I add numbers in a listBox? eg. I have a list of numbers in my listbox and I want to add them and place the result in a textBox.
-
hi, How do I add numbers in a listBox? eg. I have a list of numbers in my listbox and I want to add them and place the result in a textBox.
Use a variable to maintain a running sum. Iterate through each item in the listbox. For each iteration, convert the value of the current item to a number and add its value to the current value of the running sum variable. Finally, write the value of the running sum variable to your textbox. Paul
-
hi, How do I add numbers in a listBox? eg. I have a list of numbers in my listbox and I want to add them and place the result in a textBox.