jeudi 8 mars 2018

How to get MethodInfo of Contains method of IQueryable

I tried this:

MethodInfo method = typeof(Queryable).GetMethod("Contains", new Type[] { typeof(TSource) });

but it returns null

specified the BindingFlags

  MethodInfo method = typeof(Queryable).GetMethod(
  name: "Contains",
  bindingAttr: BindingFlags.Public | BindingFlags.Static ,
  binder: null,
  types: new Type[] { typeof(TSource) },
  modifiers: null);

but still returns null





Aucun commentaire:

Enregistrer un commentaire