This is not a "normal" keyword, such as if , for , etc.
This is a contextual keyword such as yield , from , etc.
In particular, this compiles:
object dynamic = 0;
but this is not so:
object string = 0;
You need to "escape" the string as follows:
object @string = 0;
This is of great importance from the point of view of backward compatibility: it is unlikely that many people will create a type called dynamic (which will cause ambiguity; in this case, the IIRC, the "real" type wins), while it is very likely that the existing code uses variables, called dynamic .
In a sense, it should not even be a contextual keyword (and I do not believe that a specification ever explicitly refers to it as such) - you can think of it as a type name that is always available (for example, string and object ) . I would suggest that string , etc. They were made by keywords from v1 to avoid confusion, but adding genuine keywords (which cannot be used as identifiers) will now have a high compatibility cost.
Jon skeet
source share