A First Look at Dynamic Typing

Starting with C# 4.0, late-bound access to members is also available through dynamic typing. In such a case, the compiler has no idea about the existence of the selected members. This kind of behavior is desirable in various scenarios:

Image Objects may be totally typeless because they come from some dynamic language like Ruby or Python.

Image Data representations may not have a schema, like with Extensible Markup Language (XML) documents with no corresponding XML Schema Definition (XSD) schema.

You received some object back ...

Get C# 5.0 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.