How to create a string by repeating a character in VB.NET

1 Answer

0 votes
Imports System

Public Class Program
	Public  Shared Sub Main()
		Dim s As String = New String("P"c, 10)
        Console.Write(s)
    End Sub
End Class



' run:
'
' PPPPPPPPPP
'

 



answered Nov 13, 2021 by avibootz

Related questions

1 answer 107 views
1 answer 109 views
1 answer 148 views
1 answer 131 views
1 answer 137 views
1 answer 191 views
...