As a first note, I work on mono, not the very newest version from git, but quite new. I may test it on other versions as well, but I will have problems testing it on .NET.
Wiki tells us, that InvokeGet is for properties, yet I see it works with instance fields as well.
So this works:
var value = Dynamic.InvokeGet(target, "myField");
but this does not:
var context = InvokeContext.CreateStatic(target.GetType());
var value = Dynamic.InvokeGet(context, "myStaticField");
It fails with:
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException:
`TargetType` does not contain a definition for `get_myStaticField`.
Am I doing something wrong or is it a bug?