Possible Duplicate:
How does reflection tell me when a property is hiding an inherited member with the 'new' keyword?
Using reflection how can I tell if a property is shadowing another property? I am working on some code generation and I need that information to call said properties correctly.
Exmaple:
class A{
int Foo {get;set;}
}
class B:A{
string new Foo {get;set;}
}
Code I would need to generate:
someB.Foo = "";
((A)someB).Foo = 0;