Why does re-sharper want me to not hide a property from an abstract class? It wants me to use \'new\', but is that always preferable? It seems to imply that hiding a variable s
If you don't want the outside world to be able to access the base.property, it should be protected. If it is, you shouldn't be redefining it in a derived class. If it shouldn't be available to the derived class at all, make it private.
It's suggesting new to prevent ambiguity, but in reality you shouldn't be there to begin with.
The reason is that if I do this:
var item = new verySpecificClass();
var val = item.commonProperty;
var basic = (baseClass)item;
if(val == basic.commonProperty)
I'm going to get different results than what a reasonable programmer would expect.