Dynamic objects are a very important part of the DLR. So far in this book, when I’ve needed dynamic objects in an example, I obtained them from IronPython or IronRuby. Now I’ll show you how you can implement your own custom late-binding logic in dynamic objects. Once you’re in control of a dynamic object’s late binding behavior, many magical things can happen. As I’ll demonstrate, dynamic objects let you provide a fluent API for constructing XML documents. Moreover, the same technique can be applied to accessing files, registry entries, and so forth. In Chapter 7, we’ll use dynamic objects to implement an aspect-oriented programming framework that works across both static and dynamic languages. And Chapter 8 will show you how to use dynamic objects to do meta-programming in C#, much like meta-classes work in languages like Python, Ruby and Groovy.
KeywordsStatic Object Dynamic Object Customer Class Python Code Salary Property
Unable to display preview. Download preview PDF.