How to create a list of strings in VB.NET

1 Answer

0 votes
Imports System
Imports System.Collections.Generic

Public Class Program
	Public Shared Sub Main()
		Dim lst As New List(Of String) From {"vb.net", "c", "c++", "c#", "java"}
		
		For Each s In lst
            Console.WriteLine(s)
        Next
    End Sub
End Class





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

 



answered Nov 14, 2021 by avibootz

Related questions

...