Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there

Trying to use Activator to create an object with parameters (outside of a remoting context).

Basically want to create an object - say Person - with a string as a parameter.

I can't find an example of how to use Activator with a parameter (i.e. Activator will use the constructor with the one string as parameter).
Posted

1 solution

http://msdn.microsoft.com/en-us/library/system.activator.createinstance%28VS.71%29.aspx[^]

Looks like there's several methods for providing parameters to pass to constructors.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900