G
Guest
Hello everyone!
I have a problem about create an instance automatically in C#. Now I have a
class: namespace1.namespace11.CClass01. I want to create it's instance in a
function named CreateObjInstance. And the function not only generate just
CClass01. So I must sent the class type(whit it's namespace) into the
function.
There has two question following.
The first is I can't send a class type into function. It must is a object
instance. Can I do like that?
Secondly, How can I generate a class instance which not like: CClass01
newInstance = new CClass01. I need a CClass01 instance after I told the class
name to the function. Of course with some parameter of structure.
Thanks.
I have a problem about create an instance automatically in C#. Now I have a
class: namespace1.namespace11.CClass01. I want to create it's instance in a
function named CreateObjInstance. And the function not only generate just
CClass01. So I must sent the class type(whit it's namespace) into the
function.
There has two question following.
The first is I can't send a class type into function. It must is a object
instance. Can I do like that?
Secondly, How can I generate a class instance which not like: CClass01
newInstance = new CClass01. I need a CClass01 instance after I told the class
name to the function. Of course with some parameter of structure.
Thanks.