Shadow Property

Ok… creating a class, then creating a subclass of that and adding new methods or properties is fine…

but how to do the “opposite”

I have a class from which 5 other classes inherit… but of those 5 … ONE of them needs to NOT expose 4 properties

I could create a class without those properties (A), then a subclass (B) that adds those, and have 4 inherit from “B” and one from “A”
but really was hoping there was a better way.

One thing I have tried is to create those 4 properites in the one class and set them to PRIVATE
but I get a warning of “This property shadows one already defined” …

Change your properties to a pair of getter/setting methods. That’s the safest way.

Create a computed property with the same name as the property and make that private. BUT shadowed properties can be bypassed, just so you’re aware.

Thanks… .and yeah… I just want to keep them out of autocomplete and if a developer decided to bypass them, then the consequences are theirs

I usually would take the path you described as unwanted: Building a sub-subclass and inheriting from either.

If you want to hide properties from autocomplete and debugger insights, you can give them a “Hidden” attribute.