简体   繁体   中英

Create object instance from assembly using AppDomain

I have a class library ClassLibrary1.dll in c:\\MyDll\\ClassLibrary1.dll with this

public class Class1
{
    public void Run()
    {
        Console.WriteLine("Inside Class 1 Library ");
    }
}

Using AppDomain how would i create a instance for the class Class1 and execute the method "Run" in .net 2.0 Note: I do not want to use Assembly.LoadFile

This page discusses creating app domains, loading assemblies and types into that app domain, and then closing the app domain:

http://msdn.microsoft.com/en-us/library/yk22e11a.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM