Hack Forums
[.NET] VB.NET Listbox Aggregation - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] VB.NET Listbox Aggregation (/showthread.php?tid=6149854)



VB.NET Listbox Aggregation - Prisoft - Apr 18, 2021

Code
Dim a as integer = lbox.items.length
dim x as integer = 0
dim topla as integer = 0
Dim s as double(veya float) = 0

While x<a
s = lbox.item(x).value
Topla = topla + s
X++
End while

Msgbox(topla.tostring)

You may need to convert to double a while getting a value to S .. For your information.