Sunday, July 27, 2014

How to create objects dynamically by passing type in c#?

Maybe your looking for Activator.CreateInstance() function.


Here is a post handling the same question: http://ift.tt/1rP6tvU


In your case you have to concatenate your type with the string "ViewModel" to get your complete type name.


No comments:

Post a Comment