Late Binding to an Object Using Reflection

When the compiler encounters a reference when building an assembly, it loads the referenced assemblies and uses them to resolve all of the unresolved types. However, if you don't have the reference at compile time, you will not be able to call methods. You have just seen that with the classes in System.Reflection, you can dissect any assembly and find the methods and types in the assembly. It turns out that System.Reflection provides a means whereby a call can be made to a method in an assembly that is not known at compile time. This process is known as late binding.

It might be difficult to understand the usefulness of late binding at first, but some applications are not possible without a means of ...

Get .NET Common Language Runtime Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.