Dynamic Language Extensions
WHAT’S IN THIS CHAPTER?
- Understanding the Dynamic Language Runtime
- The dynamic type
- The DLR ScriptRuntime
- Creating dynamic objects with DynamicObject and ExpandoObject
WROX.COM CODE DOWNLOADS FOR THIS CHAPTER
The wrox.com code downloads for this chapter are found at http://www.wrox.com/remtitle.cgi?isbn=1118314425 on the Download Code tab. The code for this chapter is divided into the following major examples:
In this chapter, you’ll look at the dynamic type and the rules for using it. You’ll also see what an implementation of DynamicObject looks like and how it can be used. ExpandoObject, which is the frameworks implementation of DynamicObject, will also be covered.
DYNAMIC LANGUAGE RUNTIME
The dynamic capabilities of C# 4 are part of the dynamic language runtime (DLR). The DLR is a set of services that is added to the common language runtime (CLR) to enable the addition of dynamic languages such as Ruby and Python. It also enables C# to take on some of the same dynamic ...