DynamicLoading Sample (Load Classes from Deployed Assemblies)
This sample demonstrates how classes can be loaded from managed DLLs deployed to multiple locations using the Class.forName APIs. There are two versions of Class.forName:
Class.forName(String assemblyName, String className, boolean absolutePath)
For more information, see Runtime Binding: Class.forName() Semantics.
This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices. Microsoft assumes no liability for incidental or consequential damages should the sample code be used for purposes other than as intended.
Building and Running the Sample
To open the sample file in Solution Explorer
Click Download Sample.
The File Download message box appears.
Click Open, and on the left column of the zip folder window, click Extract all files.
The Extraction Wizard opens.
Click Next. You can change the directory that the files will be extracted to, and then click Next again.
Make sure that the Show extracted files check box is selected, and click Finish.
To build this sample
From the command line, type BUILD.bat.
For more information, see.
To run this sample
Type DynamicLoading.exe from the command line.