Can I escape a double quote in a verbatim string literal?
Use a duplicated double quote.
@"this ""word"" is escaped";
outputs:
this "word" is escaped
Use double quotation marks.
string foo = @"this ""word"" is escaped";
For adding some more information, your example will work without the @
symbol (it prevents escaping with \), this way:
string foo = "this \"word\" is escaped!";
It will work both ways but I prefer the double-quote style for it to be easier working, for example, with filenames (with lots of \ in the string).