Public Class Tester
Public Shared Sub Main
Dim quote As String = "AAAAAasdfasdfasdfasdfasdfasdfasdfadsfasdfadsfads"
Dim bytes() As Byte
' ----- Assumed to be all ASCII character.
bytes = System.Text.Encoding.UTF8.GetBytes(quote)
bytes(46) = 33 ' ASCII exclamation point
Console.WriteLine(System.Text.Encoding.UTF8.GetString(bytes))
' ----- Works with all character sets.
bytes = System.Text.Encoding.Unicode.GetBytes(quote)
bytes(92) = 63 ' ASCII question mark
bytes(93) = 0
Console.WriteLine(System.Text.Encoding.Unicode.GetString(bytes))
End Sub
End Class
AAAAAasdfasdfasdfasdfasdfasdfasdfadsfasdfadsfa!s
AAAAAasdfasdfasdfasdfasdfasdfasdfadsfasdfadsfa?s