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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.