How to count dictionary items in VB.NET

1 Answer

0 votes
Module Module1

    Sub Main()

        Dim dic As New Dictionary(Of Integer, String)

        dic.Add(1, "VB.NET")
        dic.Add(2, "Java")
        dic.Add(5, "C++")
        dic.Add(9, "PHP")

        Console.WriteLine(dic.Count)

    End Sub

End Module

' run:
' 
' 4

 



answered Sep 27, 2018 by avibootz
...