r/programminghelp • • Feb 22 '20

C# Wont Replace Correctly

Post image
8 Upvotes

5 comments sorted by

View all comments

3

u/jakbrtz Feb 22 '20

I'm not sure what you're trying to achieve, but I think it's useful that you know that you can chain the replace methods like this:

OutputBox.Text = OutputBox.Text.Replace("a","").Replace("b","");

1

u/AccHasBeentaken Feb 22 '20

Thanks, I'll try that.