How to replace one substring with another in StringBuilder with VB.NET

1 Answer

0 votes
Imports System.Text

Module Module1

    Sub Main()

        Dim sb As New StringBuilder("VB.NET Java C#")

        sb.Replace("C#", "PHP")

        Dim s As String = sb.ToString

        Console.WriteLine(s)

    End Sub

End Module

' run:
' 
' VB.NET Java PHP

 



answered Sep 24, 2018 by avibootz

Related questions

1 answer 223 views
2 answers 273 views
1 answer 239 views
1 answer 184 views
1 answer 212 views
...