Using the dynamic type
Throughout this book, we have talked about the CLR. .NET Framework, however, contains another component called the Dynamic Language Runtime (DLR). This is another runtime environment that adds a set of services on top of the CLR to enable dynamic languages to run on the CLR and to add dynamic features to statically-typed languages. C# and Visual Basic are statically-typed languages. By contrast, languages such as JavaScript, Python, Ruby, PHP, Smalltalk, Lua, and others are dynamic languages. The key characteristic of these languages is that they identify the type of an object at runtime and not at compile time as in the case of the statically-typed languages.
The DLR provides C# (and Visual Basic) with dynamic features that enable them to interoperate with dynamic languages in a simple manner. As mentioned before, the DLR adds a set of services to the CLR. These services are as follows: