我试过了:
MethodInfo method = typeof(Queryable).GetMethod("Contains", new Type[] { typeof(TSource) });
但它会返回null
指定了BindingFlags
MethodInfo method = typeof(Queryable).GetMethod(
name: "Contains",
bindingAttr: BindingFlags.Public | BindingFlags.Static ,
binder: null,
types: new Type[] { typeof(TSource) },
modifiers: null);
但仍然返回null