|
by Paulo Morgado via Paulo Morgado : C# on 8/4/2008 12:23:00 AM
(This was pointed out to me by Frans Bouma and explained by Jon Skeet)
Imagine you have this set of classes:public class A
{
public virtual string P
{
get { return "A"; }
}
}
public class B : A
{
}
public class C : B
{
public override string P
{
get { return "C"; }
}
}
And this class:public static class Reporter
{
public static void Report<T>(T target, Expression<Func<T, string>> expression)
{
Consol
... [ read more ]
|