Link to home
Start Free TrialLog in
Avatar of mpaturi1
mpaturi1

asked on

Replace a character with string

How can I replace a char with a string like
str.Replace('&', 'and');
Avatar of burakiewicz
burakiewicz
Flag of United States of America image

str.Replace("&","and")
ASKER CERTIFIED SOLUTION
Avatar of Frosty555
Frosty555
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of joechina
joechina

str.Replace("&", "and");
Avatar of mpaturi1

ASKER

I was missing the left hand side of the str.Replace("&","and");
after making change to the code as

str mystring = str.Replace("&", "and");

It was fine.