CHAPTER 16 DYNAMIC TYPES AND THE DYNAMIC LANGUAGE RUNTIME
Figure 16-4. The LateBindingWithDynamic project has a private copy of MathLibrary.dll
Note Remember, the whole point of late binding is to allow an application to create an object for which it has
no record of in the manifest. This is why you manually copied MathLibrary.dll into the output folder of the
Console project, rather than reference the assembly using Visual Studio.
Now, import the System.Reflection namespace into the Program.cs file of your Console Application
project. Next, add the following method to the Program class, which invokes the Add() method using
typical reflection API calls:
private static void AddWithReflection()
{
Assembly asm = Assembly.Load("MathLibrary");
610