G
Guest
How can i load an interface from a dll using System.Reflection?
I can see how its possible to do this on methods, properties in a class. You
create an instance of the class and use the invoke method.
Type t = Type.GetType("MyAssembly.MyClass");
Object obj1 = Activator.CreateInstance(t);
obj1.GetType().InvokeMember("MyMethod",BindingFlags.Default,null,obj1,new
object[]{});
But you cannot create instances of interfaces, so how can you late bind
methods/properties in an interface....?
thanks
An interface however cannot create instances, so
I can see how its possible to do this on methods, properties in a class. You
create an instance of the class and use the invoke method.
Type t = Type.GetType("MyAssembly.MyClass");
Object obj1 = Activator.CreateInstance(t);
obj1.GetType().InvokeMember("MyMethod",BindingFlags.Default,null,obj1,new
object[]{});
But you cannot create instances of interfaces, so how can you late bind
methods/properties in an interface....?
thanks
An interface however cannot create instances, so