How to replace the first N characters in a string in VB.NET

1 Answer

0 votes
Imports System

Public Class Program
	Public Shared Sub Main()
		Dim str As String = "pro vb.net"
		
        Dim N As Integer = 3
        str = "XYZ" & str.Substring(N)
		
        Console.WriteLine(str)
    End Sub
End Class




' run:
'
' XYZ vb.net
'

 



answered Jun 12, 2022 by avibootz
...