I am wondering what is the \"best practice\" to break long strings in C# source code. Is this string
\"string1\"+
\"string2\"+
\"string3\"
con
If the whitespace isn't important then you can use the @ escape character to write multi-line strings in your code. This is useful if you have a query in your code for example:
string query = @"SELECT whatever
FROM tableName
WHERE column = 1";
This will give you a string with line breaks and tabs, but for a query that doesn't matter.