C# @ operator (not for string literals)

Viewed 6102

What does the @ in this mean (I know it's using an obsolete .NET Framework 1.1 ConfigurationSettings.AppSettings)?

@ConfigurationSettings.AppSettings["some_setting"];

This is NOT a string literal: Using the literal '@' with a string variable

The actual code:

_scale_id_regex = @ConfigurationSettings.AppSettings["ScaleIdRegEx"];

In a regular .cs file which is part of a Windows Service and _scale_id_regex is just a private string in the class, so ASP.NET and Razor are not involved.

4 Answers
Related