How to initialize a set 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 _set As ISet(Of String) = New HashSet(Of String) From {
            "c#",
            "vb.net",
            "c",
            "c++",
			"java",
			"php"
        }
        Console.WriteLine(String.Join(" ", _set))
    End Sub
End Class





' run:
'
' c# vb.net c c++ java php
'

 



answered Jul 16, 2022 by avibootz

Related questions

...