hi all,
i have a class library (dll) online and making a c# application.
what i want to do is
(1) download this dll during runtime
(2) and create an instant of a class in this class library
you guys have any idea? :confused:
1 reply to this topic
#1
Posted 18 July 2010 - 08:20 PM
|
|
|
#2
Posted 18 July 2010 - 10:10 PM
i've finally found out how to make it happen using Assembly and InvokeMethod
eg.
eg.
using System;
using System.Windows.Forms;
using System.Reflection;
public class prova:Form {
public static void Main() {
Assembly Asm = Assembly.LoadFrom("d:/media_player.dll");
Type player = Asm.GetType("media_player");
object Player = Activator.CreateInstance(player);
player.InvokeMember("info",BindingFlags.InvokeMethod,null,Player,null);
}
}
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









