How to create string 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 HashSet(Of String) = New HashSet(Of String) From {
            "c#",
            "java",
            "vb.net",
            "c",
            "vb.net",
            "c++",
            "python",
            "vb.net",
            "c"
        }
        Console.WriteLine(String.Join(" ", [_set]))
    End Sub
End Class


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

 



answered Sep 3, 2023 by avibootz

Related questions

3 answers 146 views
1 answer 113 views
1 answer 207 views
2 answers 209 views
...