c# - Reflect specific framework version? -


using mono.cecil

if (methoddefinition.returntype == assemblydefinition.mainmodule.import(typeof(string)))

is failing because assembly reading .net 2 program .net 4. trying compare string v2 , string v4 never equal. how can string v2 without building program .net 2?

your question similar this one

in short, should able string type :

assemblydefinition.mainmodule.typesystem.string 

Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -