I have tried using the simple Replace function in C# to find and replace a single apostrophe with two, but neither the Replace function nor the IndexOf function find the single apostrophe.
Example: strToReplace = "Joe's shoes"
-- Code: strToReplace = strToReplace.Replace("'", "''");
Result I want: "Joe''s shoes" -- in order to use in a SQL insert later.
Example: strToReplace = "Joe's shoes"
-- Code: strToReplace = strToReplace.Replace("'", "''");
Result I want: "Joe''s shoes" -- in order to use in a SQL insert later.