C# Language Interpolated Verbatim Strings


Verbatim strings can be combined with the new String interpolation features found in C#6.

Console.WriteLine($@"Testing \n 1 2 {5 - 2}
New line");


Testing \n 1 2 3
New line

Live Demo on .NET Fiddle

As expected from a verbatim string, the backslashes are ignored as escape characters. And as expected from an interpolated string, any expression inside curly braces is evaluated before being inserted into the string at that position.