This project has moved and is read-only. For the latest updates, please go here.


protected static methods


var method = typeof (CollectionSourceBase).GetMethod("CombineCriteria", BindingFlags.Static | BindingFlags.NonPublic);

the above works fine but not the next one am i missing something?

var methodInfo = typeof(CollectionSourceBase).Method("CombineCriteria");
Closed Nov 23, 2013 at 7:14 PM by mertner
The default flags used by Fasterflect is InstanceAnyVisibility, which does not include static fields.


mertner wrote Nov 23, 2013 at 7:11 PM

Try passing in a custom flags specification to ensure that static fields are included:
var methodInfo = typeof(CollectionSourceBase).Method("CombineCriteria", Flags.StaticAnyVisibility);