.net - How Type.GetType works when given partially qualified type name? -


in numerous places encounter partially qualified type names of form fulltypename, assemblyname, i.e. type.assemblyqualifiedname without version, culture , publickeytoken qualifiers.

my question how can 1 convert respective type in minimum of effort? thought type.gettype job, alas, not. following code, instance, returns null:

type.gettype("system.net.sockets.socketexception, system"); 

of course, if specify qualified name work:

type.gettype("system.net.sockets.socketexception, system, version=2.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089"); 

thanks lot.

if dll it's in isn't loaded application domain (e.g. used it), need full path this, if it's loaded, can find shorter version.

to answer question: second version works, stick , have 1 way worry about.


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -