How to create a string with a repeated character N times in VB.NET

1 Answer

0 votes
Imports System

Class Program
    Public Shared Sub Main(ByVal args As String())
        Dim repeated As String = New String("*"c, 10)
		
        Console.WriteLine(repeated)
    End Sub
End Class



' run:
' 
' **********
'

 



answered Jul 28, 2025 by avibootz
...