- Home /
SOLVED - String replace % with " in C#
Dear All,
How do you make a C# script replace % with "? Apparently the below code does not work:
text = text.Replace("%", """");
I am thanking you for any hint or help in advance.
Answer by ArkaneX · Nov 13, 2013 at 11:29 AM
text = text.Replace("%", "\"");
EDIT: eventually you can use verbatim string literals, and use
text = text.Replace("%", @"""");
Dear ArkaneX,
You helped me out again! Thank you! Balázs
Then please be so kind to mark my answers as valid, by ticking a button on the top left of the answer, below voting buttons.
If any of your other questions had been answered, please tick the correct answers as well. This way you help community and the people who answered. Correct answer gives us karma points - just like experience points in role playing games :)
Hmmm. I just received an email stating that you accepted the answer, but it looks like the accepted status was then removed. Have you unticked it?
$$anonymous$$y mouse is playing around with me. Sometimes when I single click it performs double. So I accepted your answer and accidentally unticked it. LOL :) Reticked it, thank you again for the help. :)
Thanks, and please remember to accept other solved questions :)