About
In this code snippet, we will take a look at string literals and the @ character in C#.
In C# the @ character can either be used to make reserved keywords available as variable names or it can be used to make a string literal. A string literal takes everything in the string literally. For example, you do not have to escape a \ with \\ . Your string can now also span multiple rows in the editor. This can be useful when making SQL statements or HTML, XML, …
Let’s have a look at the code below to see how to use the @ character.