Search code examples
c#stringescaping

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#?


Solution

  • Try this:

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