O'Reilly logo

Microsoft® .NET Compact Framework Kick Start by Ronnie Yates, Erik Rubin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Loading .NET Assemblies

The System.Reflection.Assembly class represents a physical .NET executable, either an .exe or a .dll file. The System.Reflection.Assembly class can be used to load assemblies, load modules, or discover a type from the assembly and create an instance of it. The Assembly class does not have a public constructor, so in order to get a reference to an Assembly instance, you must use a static method on the Assembly class itself. The static method LoadFrom loads an assembly given its filename. This method loads the assembly into the AppDomain of the caller and returns an Assembly instance that represents the loaded assembly. Listing 13.1 demonstrates how to load an assembly by using the LoadFrom method.

Listing 13.1.
 C# Assembly ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required