No System.Dynamic Type
C# has a bunch of aliases for BCL types in the form of reserved words, such as int, long, bool, string, and object (among various others). You might rightfully wonder whether the new dynamic type is also an alias for some BCL type. It turns out it is, but maybe not what you expect it to be.
First, let me disappoint you. There is no such thing as a System.Dynamic type, which would be the most logical guess. To understand why this is not the way things are done to achieve the effects of the dynamic feature, you need to understand a few things:
• An object typed as dynamic can really be anything at runtime, so if there were a specific type for everything typed as dynamic, it would better be compatible with all types that are ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access