0
我有一個問題涉及字符串Replace
函數在Visual Basic .NET中:如何替換VB.NET中的子字符串?
我有我的項目的Visual Basic腳本。我有一個名爲RichTextBox
sample
Dim string1 as string = "text to find"
Dim string2 as string = "text to replace find with"
Dim mediacurrent as string
mediacurrent = sample.text
mediacurrent.replace(string1, string2)
sample.text = mediacurrent
以上腳本返回空白文本框。注意文本框很豐富,包含非格式但多行文本。我究竟做錯了什麼?