Reputation: 3624
Here is my class :
public class PrimtivePropertyProxy<T> : FrameworkElement
{
public string Name
{
get;
private set;
}
[....]
}
There already is a field Name in FrameWork element but still, I'd like to define a property name so that when I do :
myPrimtivePropertyProxy.Name;
it returns the Name I defined in my class, and not the one from FrameworkElement. I know this is a complete hiding but, well, that's what I need to do !
Upvotes: 0
Views: 1093
Reputation: 4269
And to avoid the compiler's warning, use the new
keyword.
public new string Name
{
get;
private set;
}
Upvotes: 0
Reputation: 10940
is this what you want?
public new string Name
{
get;
private set;
}
Upvotes: 2