How to initialize a list of strings inline in VB.NET

1 Answer

0 votes
Imports System
Imports System.Collections.Generic

Public Class Program
	Public Shared Sub Main()
        Dim list = New List(Of String) From {
            "python",
			"vb.net",
            "c",
            "c++",
            "java",
            "php",
            "go"
        }
        Console.WriteLine(String.Join(" ", list))
    End Sub
End Class





' run:
'
' python vb.net c c++ java php go
'

 



answered Aug 11, 2023 by avibootz

Related questions

1 answer 187 views
1 answer 194 views
1 answer 120 views
1 answer 138 views
2 answers 136 views
...