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