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 116 views
1 answer 122 views
1 answer 164 views
1 answer 145 views
1 answer 152 views
1 answer 198 views
...