StringBuilder.Replace replaces all occurrences of a character in this instance with another specified character. : StringBuilder « Language Basics « VB.Net
StringBuilder.Replace replaces all occurrences of a character in this instance with another specified character.
Imports System
Imports System.Text
Class Sample
Public Shared Sub Main()
Dim str As String = "!#"
Dim sb As New StringBuilder(str)
sb.Replace("#"c, "!"c, 15, 29)
Show(sb)
End Sub
Public Shared Sub Show(sbs As StringBuilder)
Console.WriteLine("{0}", sbs.ToString())
End Sub
End Class