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.


Popular posts from this blog

javascript - Js, document.getElementById("ID").innerHTML, error -

objective c - Is there a way in OCMockito to make stubs fail when an unknown method is called? -

jquery - jqGrid update specific column data with out refreshing the entire column? -