How to Pass Parameters to Activator.CreateInstance<T>()
Posted
by DaveDev
on Stack Overflow
See other posts from Stack Overflow
or by DaveDev
Published on 2010-03-16T00:07:07Z
Indexed on
2010/03/16
0:09 UTC
Read the original article
Hit count: 333
Hi guys
I want to create an instance of a type that I specify in a generic method that I have. This type has a number of overloaded constructors. I'd like to be able to pass arguments to the constructors, but
Activator.CreateInstance<T>()
doesn't see to have this as an option.
Is there another way to do it?
Thanks
Dave
© Stack Overflow or respective owner