G
Guest
here is the simplified code: the myCor is set to null when run the program.
but if remove the "ref" from the constructor's parameter, myCor gets a valid
value.
Please help!!! thanks.
Type myType = myAssembly.GetType("MyClass")
Type[] parameters = new Type[1];
parameters[0] = typeof(object);
ConstructorInfo myCor = myType .GetConstructor(parameters);
public class MyClass
{
public MyClass(ref object obj)
{
object o = obj;
}
}
but if remove the "ref" from the constructor's parameter, myCor gets a valid
value.
Please help!!! thanks.
Type myType = myAssembly.GetType("MyClass")
Type[] parameters = new Type[1];
parameters[0] = typeof(object);
ConstructorInfo myCor = myType .GetConstructor(parameters);
public class MyClass
{
public MyClass(ref object obj)
{
object o = obj;
}
}