Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
C# relies on the Dynamic Language Runtime (DLR) to perform dynamic binding.
Contrary to its name, the DLR is not a dynamic version of the CLR. Rather, it’s a library that sits atop the CLR—just like any other library such as System.Xml.dll. Its primary role is to provide runtime services to unify dynamic programming—in both statically and dynamically typed languages. Hence languages such as C#, VB, IronPython, and IronRuby all use the same protocol for calling functions dynamically. This allows them to share libraries and call code written in other languages.
The DLR also makes it relatively easy to write new dynamic languages
in .NET. Instead of having to emit IL, dynamic language authors work at
the level of expression trees (the same expression
trees in System.Linq.Expressions that
we talked about in Chapter 8).