How can I add " character to a multi line string declaration in C#?

If I write something like this:

string s = @"...."......";

it doesn't work.


If I try this:

string s = @"...\".....";

it doesn't work either.

How can I add a " character to a multi line string declaration in C#?


Try this:

string s = @"..."".....";

The double character usage also works with the characters { and } when you're using string.Format and you want to include a literal instance of either rather than indicate a parameter argument, for example:

string jsString = string.Format(
    "var jsonUrls = {{firstUrl: '{0}', secondUrl: '{1}'}};",
    firstUrl,
    secondUrl
    );