I tried to create an Instance as :
Form tempForm = (Form)Activator.CreateInstance(t);
t is a type from reflection.
However, there is a paramater required for the construct of form t , how to pass the parameter when create the instance?
Thanks.
I tried to create an Instance as :
Form tempForm = (Form)Activator.CreateInstance(t);
t is a type from reflection.
However, there is a paramater required for the construct of form t , how to pass the parameter when create the instance?
Thanks.
There are overloads for that method,
have a look here : http://msdn2.microsoft.com/en-us/library/wcxyzt4d.aspx
should be the one you need
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.