StringDictionary.Count gets the number of key/value pairs
Imports System
Imports System.Collections
Imports System.Collections.Specialized
Public Class SamplesStringDictionary
Public Shared Sub Main()
Dim myCol As New StringDictionary()
myCol.Add("red", "R")
myCol.Add("green", "G")
myCol.Add("blue", "B")
Console.WriteLine(myCol.Count)
End Sub 'Main
End Class 'SamplesStringDictionary
Related examples in the same category