jeudi 9 avril 2015

MethodInfo showing null when getMethod is invoked with parameters containing reference type

AttributeA = pdmsAssembly.GetType("A.Core.Data.DbAttribute");


ElementA = pdmsAssembly.GetType("A.Core.Data.DbElement");


MethodInfo mi =dbElementA.GetMethod("GetString",BindingFlags.Static | BindingFlags.Public,null,new Type[] { AttributeA ,typeof(System.String)},null)


mi is returning as null


GetString method has 2 parameters 1) A.Core.Data.DbAttribute 2) String


A.Core.Data.DbAttribute is a reference type (abstract class)


Can u suggest how to use the getMethod properly in this case.






Aucun commentaire:

Enregistrer un commentaire