How to initialize HashSet in VB.NET

1 Answer

0 votes
Imports System
Imports System.Collections.Generic

Public Class Program
    Public Shared Sub Main(ByVal args As String())
        Dim hset As HashSet(Of String) = New HashSet(Of String) From {
            "vb.net",
            "c#",
            "c",
            "c++",
            "python"
        }
		
        Console.WriteLine(String.Join(" ", hset))
    End Sub
End Class



' run:
'
' vb.net c# c c++ python
'

 



answered Jul 18, 2022 by avibootz

Related questions

2 answers 242 views
1 answer 134 views
134 views asked Mar 9, 2023 by avibootz
2 answers 165 views
1 answer 157 views
1 answer 166 views
...