c# or VB.net About casting an object into a datatype -


is there way able cast object depending on whats datatype written string after instanciating through relfection? example:

string datatype = "list<genericclassname>"; list<genericclassname> o = (datatype)dynamicallyinstantiateclass("namespace.classname"); 

of course can :

   dynamic d = activator.createinstance("assemblyname","typename");    d.dosomthing(); 

to find assembly name right click on projects own's class in application tab can find type assembly name


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -