troubleshooting Question

Replace all instances

Avatar of michael1174
michael1174Flag for United States of America asked on
3 Comments1 Solution430 ViewsLast Modified:
Hello, I'm trying to replace all instances of, for example, the > sign in a string.

I know I can do a string.replace(">",">").  But this only replaces once instance.  What is the best way that I can replace all instances?

I've tried, but for some reason its not working and my text has alot of amp; in it after its done processing.

foreach (char c in value)
       value = Replace(">", ">");
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros