D
Daniel
hi ng,
i want to invoke a dynamically created object with reflection, like:
public static object createInstance(string classname, string assemblyName)
{
object obj=null;
Assembly assembly=
Assembly.LoadFile(AppSettings.Root+@"bin\"+assemblyName);
obj=assembly.CreateInstance(classname);
return obj;
}
what happens is that all the properties of the object show a
<error: an exception of type: {System.ArgumentException} occurred> string
in the debugger.
whereas the prtivate fields have the correct null value.
what is wrong there?
i don't get it.
thank you very much for your help!
dan
i want to invoke a dynamically created object with reflection, like:
public static object createInstance(string classname, string assemblyName)
{
object obj=null;
Assembly assembly=
Assembly.LoadFile(AppSettings.Root+@"bin\"+assemblyName);
obj=assembly.CreateInstance(classname);
return obj;
}
what happens is that all the properties of the object show a
<error: an exception of type: {System.ArgumentException} occurred> string
in the debugger.
whereas the prtivate fields have the correct null value.
what is wrong there?
i don't get it.
thank you very much for your help!
dan