I have a web application project called Site, and in it is a folder called SITE (I know, not the best naming conventions, but that’s another story).
When I check the designer generated code it starts like this:
namespace Site.@__SITE__ {
Why is the at sign added? I can remove it and the project compiles and runs fine. Also, with or without the at sign, the actual namespace is Site.__SITE__.
Thanks!
The @ symbol is a way of allowing names which conflict with C# keywords to be used in a C# application. All names in C# which begin with __ are reserved for future use. As a result whenever the CodeDom emits code where a name is prefixed with __, it will emit a @ sign in order to guarantee the name will be legal since it may conflict with a future C# keyword.
The code you are seeing is likely following the same rules or just emitted as part of the CodeDom