views:

700

answers:

3
+5  A: 

Just use .Name; PropertyInfo doesn't define this - it inherits it from MemberInfo

Marc Gravell
+1  A: 

Just:

property.Name
Koistya Navin
+4  A: 

You can access this property via property.Name.

The fact that the debugger shows base.Name is a bit of a misnomer. In reality the C# EE is evaluating property.Name under the hood. It does not actually evaluate "base.Name".

This is true regardless of whether or not the property / method is virtual. The reason being that the CLR deubgger provides no means by which the EE can invoke a virtual method in a non-virtual method. There are ways to call a method via relfection to achieve this effect but neither C# or VB.Net go this route in their respective EE's.

JaredPar