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
Post a Comment