my question, is it possible to count the total of each number without define the criteria, so just calculate automatically which listed in listbox.
what i am expected the result should be,
dim d as new dictionary
for currentRow as integer = 0 to listbox.rowcount - 1
dim theNumber as integer = val(listbox.cell(currentrow, 0)
if d.haskey(thenumber) then
d.value(thenumber) = val(d.value(thenumber)) + 1
else
d.value(thenumber) = 1
next
For Each row As ListboxRow In Listbox1.Rows
Dim key As String = row.ColumnValueAt(0)
If d.haskey(key) = False Then
d.value(key) = 0
End If
d.value(key) = d.value(key) + 1
Next
For Each key As String In d.Keys
System.DebugLog(key+ “=” + d.value(key))
Next[/code]
dim d as new dictionary
for currentRow as integer = 0 to listbox.rowcount - 1
dim theNumber as integer = val(listbox.cell(currentrow, 0))
d.value(thenumber) = d.lookup(thenumber, 0) + 1
next