How to use verbatim strings with interpolation?

You can apply both $ and @ prefixes to the same string:

string s = $@"Result...
Adding ""{x}"" and {this.Y()} to foobar:
{x.GetLog()}";

Since being introduced in C# 6, interpolated verbatim strings had to start with the tokens $@, but starting with C# 8, you can use either $@ or @$.

Leave a Comment

404 Not Found

Not Found

The requested URL was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.