c# - Can I escape a double quote in a verbatim string literal? -


in verbatim string literal (@"foo") in c#, backslashes aren't treated escapes, doing \" double quote doesn't work. there way double quote in verbatim string literal?

this understandably doesn't work:

string foo = @"this \"word\" escaped"; 

use duplicated double quote.

@"this ""word"" escaped"; 

outputs:

this "word" escaped 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -