how do i do this?
how do i do this?
i did it: just in case it was:
Code:private void GUI_Load(object sender, System.EventArgs e) {
Assembly asm = Assembly.LoadFrom("devListener.dll");
Type[] types = asm.GetTypes();
Metamorfosis Interface;
Metamorfosis ex = new Metamorfosis(this);
Type ex2 = ex.GetType();
object[] p = { this };
foreach (Type derived in types) {
if (derived.IsSubclassOf(ex2)) {
Interface = (Metamorfosis)Activator.CreateInstance(derived, p);
derived.InvokeMember("Test", BindingFlags.Default | BindingFlags.InvokeMethod,
null, Interface, new object[0]);
}
}
}
you can also use the 'is' and 'as' operators for this.
yea i've noticed that tks anyways