Multiline String Literal in C# -
is there easy way create multiline string literal in c#?
here's have now:
string query = "select foo, bar" + " table" + " id = 42";
i know php has
<<<block block;
does c# have similar?
you can use @
symbol in front of string
form verbatim string literal:
string query = @"select foo, bar table id = 42";
you do not have escape special characters when use method, except double quotes shown in jon skeet's answer.