Escape double quotes in a string

Double quotes can be escaped like this:

string test = @"He said to me, ""Hello World"". How are you?";

But this involves adding character " to the string. Is there a C# function or other method to escape double quotes so that no changing in string is required?

8 Answers
8

Leave a Comment