I have a question involving the string Replace function in Visual Basic .NET:
I have a Visual Basic script for my project. I have a RichTextBox named 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
The above script returns a blank text box. Note the text box is rich and contains non-formatted but multiline text. What am I doing wrong?