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

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -