I would like to replace a straight quotation mark (\") using C#.
I might be missing something small, but I can\'t get it with a normal string.Replace();
string.Replace();
someWord.Replace("\"", "&");
or
someWord.Replace(@"""", "&");
(Quotes are escaped as \" in regular strings and "" in verbatim strings.)
\"
""
But you probably meant
someWord.Replace("\"", """);
since the HTML entity for straight quotation marks is ", not &.
"
&