*** typeof( x.y ) gives you propertyInfo/MethodInfo

 

We are making all sorts of cool framework things, using reflection and attributes.  They are all great, but we've found a few places where we want to specify properties/methods in other classes, as arguments to attributes - (for instance - the value of this calculated field depends on the value of this other field).  It would be really nice if the typeof operator could return a methodinfo/propertyinfo object!

 

To do this we would have to extend the attribute scheme to support new kinds of information, and that would require all the languages to add support. I think it would take a fairly compelling argument to do that. I don't think that changing Type to also be able to point to methods or properties is feasible.