Many times, using long strings in our asp.net code becomes a little uncomfortable but often it becomes necessary to add long strings in our code (like SqlQuery, custom message …) . This is not a problem from the language point of view, dividing them into different lines and concatenating them either using string concatenation or using stringbuffer, is a good way to do it and also maintain the quality of the code while doing it. But in both the case they add some overhead on program execution which can be avoided.
And another difficulty arises while using special character like( /, …)
So to use long strings literally we can use verbatim string which will; represent almost the same string in a much simplistic manner.
To use it we have to append “@” (at) symbol before the string definition.
E.g.:
string verbatimString = @"I am such a string where you can mention; New Line with special character like (/,... ) and ofcourse with other benefits";