G Guest Oct 31, 2006 #2 JIM.H. said: How can I replace a ‘ (one quote) with a _ (underscore) in a string in c#? Click to expand... Use the Replace method of the string class: string aString = "A string 'with' apostrophes." string newString = aString.Replace('\'', '_');
JIM.H. said: How can I replace a ‘ (one quote) with a _ (underscore) in a string in c#? Click to expand... Use the Replace method of the string class: string aString = "A string 'with' apostrophes." string newString = aString.Replace('\'', '_');