mercredi 1 juillet 2015

Extract type at runtime

I have a Type name being passed as an input . "MyApp.Modules.Common.contact".

Using Activator.CreateInstance how do I construct this type in the method that I'm using. if I do it like this

Type typ = Type.GetType("MyApp.Modules.Common.contact")

the typ is always null. How do I fix this. Please help.





Aucun commentaire:

Enregistrer un commentaire