Hy!
I try to run the following code:
assem = System.Reflection.Assembly.LoadFrom("Full Path of
dll")
classType = assem.GetType("Namespace.ClassName")
objBatch = Activator.CreateInstance(classType, True)
2 kinds of exception message are thrown from The last
line: ArgumentException, and the
message: " Err desc: Type must be a type provided by the
runtime, not a TypeDelegator, etc.
Parameter name: type"
or invalidCastException and the following wierd
message: "Can not cast from Namespace.ClassName to
Namespace.ClassName type"
1) This code is run from class within same dll that
loaded at run time(but for differnt classes).
2) The dll is a com+ and registered in the gac(called by
other app as well)
3)From the external project of any kind the exception is
not thrown.
Any help?, may be use load method is better (I cant do it
just by string, don't know why either).