I replied the stackoverflow thread as well.
The issue is indeed a bug
which we decide not to fix (see more details in the bug).
But in reality the @string was not required and is not correct in that case. There are two main uses for @
- Specify a transition from Markup to C#, in this case you are already in C#
- Override the use of a keyword (e.g. define a variable named class: int @class)
In your example you are already in C#, and you are not intending to use @string as a variable, so the code is basically wrong. It just happened to work in V1. We did not intend to make a breaking change, but we also don't think it's important enough to fix.
in the stackoverflow thread it is also mentioned that resharper warns if you are not using the @String, well that seems to be a bug in resharper as the resulting code is the same
. or String. or string.).