D
Dan
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(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 according private fields have the correct null value.
i thought that a property is like a pointer on the field that it is
wrapping.
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(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 according private fields have the correct null value.
i thought that a property is like a pointer on the field that it is
wrapping.
what is wrong there?
i don't get it.
thank you very much for your help!
dan