16-12-13, 09:27 PM
PHP كود :
Public Class Form1
'Number , (Index, Count)'
Private myList As New Dictionary(Of Integer, Integer())
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myNum As Integer = TextBox1.Text
If ListBox1.Items.Contains(myNum) Then
myList(myNum)(1) += 1
ListBox2.Items(myList(myNum)(0)) = myList(myNum)(1)
Else
myList.Add(myNum, New Integer() {ListBox1.Items.Count, 1})
ListBox1.Items.Add(myNum)
ListBox2.Items.Add(myList(myNum)(1))
End If
End Sub
End Class

