Dim ary() As String = {0,1,2,3,4,5,6,7,8,9} Dim dic As new Dictionary(Of String, Integer) For Each s As String In ary dic.add(s, 0) Next For i As Integer = 1 To 5 Dim s As String = ary(rand.Next(ary.length)) dic(s) += 1 Next For Each s As String In ary output.show(s & ":" & dic(s)) Next