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

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

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -