Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27349

VS 2010 Multiple replacements for a string?

$
0
0
Hello, so on a button click I would like it to change some characters to some other characters.

So for example, I would like "a" to be changed to "z"
and "b" to become "f"
and "c" to become "w"


How would I do this?

I have this so far:
Code:

        Try
            RichTextBox1.Text = RichTextBox1.Text.Replace("a", "s")
        Catch ex As Exception
            MsgBox("error")
        End Try


But I cannot repeat that like 3 times or so to make all those changes. So I'm not exactly sure how I can do this?
Please help me, thanks!:)

Viewing all articles
Browse latest Browse all 27349

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>