P
Peter Smithson
Hi,
I'm new to .net so please forgive me if I've been stupid.
I've got this -
BaseCommand obj = null;
String convClassName;
....
System.Runtime.Remoting.ObjectHandle handle =
Activator.CreateInstance(null,convClassName);
obj = (BaseCommand)handle.Unwrap();
That'll create me an instance of the class called convClassName with
the default constructor.
I now want to use a non-default constructor. Looking at the versions
of CreateInstance, if I pick one that has a list of arguments, I also
have to provide something called an "activation attribute" and
"security info". But I've no idea how to fill these in! I made a
start -
System.Runtime.Remoting.ObjectHandle handle =
Activator.CreateInstance(null, convClassName,
false, // case sensitive
0, // bindingAttr
null, // binder
args,
null, // culture
activationAtr,
security
);
"activationAtr" has to have one or more items. What do I put in it?
Thanks.
Peter.
I'm new to .net so please forgive me if I've been stupid.
I've got this -
BaseCommand obj = null;
String convClassName;
....
System.Runtime.Remoting.ObjectHandle handle =
Activator.CreateInstance(null,convClassName);
obj = (BaseCommand)handle.Unwrap();
That'll create me an instance of the class called convClassName with
the default constructor.
I now want to use a non-default constructor. Looking at the versions
of CreateInstance, if I pick one that has a list of arguments, I also
have to provide something called an "activation attribute" and
"security info". But I've no idea how to fill these in! I made a
start -
System.Runtime.Remoting.ObjectHandle handle =
Activator.CreateInstance(null, convClassName,
false, // case sensitive
0, // bindingAttr
null, // binder
args,
null, // culture
activationAtr,
security
);
"activationAtr" has to have one or more items. What do I put in it?
Thanks.
Peter.