I am attempting to replace characters in a string data type. Below is my code, but the '
is not being replaced with ''
. Am I mis-understanding how the replace()
function operates? What should I do in order to change the string to High Flying Picture''s
?
This is the syntax I attempted.
public static void Test()
{
string strVar = "High Flying Picture's";
strVar.Replace("'", "''");
Console.WriteLine(strVar);
}