「VB.NET」HashSet要素数を取得する
書式
Dim 変数名 As New HashSet(Of データの型)
使用例
Module Module1
    Sub Main()
        'HashSet型変数の定義
        Dim hs As New HashSet(Of Integer)
        '要素を追加
        hs.Add(11)
        hs.Add(22)
        hs.Add(33)
        hs.Add(44)
        '要素数を取得
        Console.WriteLine(hs.Count)
        Console.ReadKey()
    End Sub
End Module
結果
4