Ok, consider the following scenario:
public class Foo()
{
[FooProperty]
public int Blah { get { .... } }
...
}
[AttributeUsage(AttributeTargets.Property)]
public class FooPropertyAttribute: Attribute
{
public FooPropertyAttribute()
{
//Is there any way to get at runtime a PropertyInfo of the declaring property 'Foo.Blah'?
}
...
}
I know this is probably not a good idea but recently, while prototyping some classe, the question came up and I'm curious to know if this is even possible.