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? :icon_rolleyes:
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? :icon_rolleyes:
i've finally found out how to make it using Assembly and InvokeMethod
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);
}
}
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.