The dynamic
Keyword in C# 4.0
One of the key features in .NET 4 is the support for reaching out to dynamically typed code (and object models representing data) from inside flagship languages such as C# and Visual Basic. The single syntactical presence of this feature in C# is the new dynamic
keyword. When an object is typed as dynamic, the compiler will emit code that causes all binding and dispatch operations to be deferred until runtime, instead of statically resolving them at compile time.
So what’s binding and dispatching all about? Binding is essentially the act of figuring out the meaning of the code with regard to intended method calls, ...
Get C# 4.0 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.