Steven Garrad <(E-Mail Removed)> wrote:
> I have a custom class that is derived from the PictureBox class. One of the
> properties from the PictureBox class is "SizeMode" and in my custom class I
> want to disable the user from being able to modify this.
>
> How can I remove this property from my class?
Doing so would break Liskov's Substitutability Principle. Basically, if
you don't want type X to have all of the same members available as type
Y, you shouldn't derive type X from type Y in the first place.
--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too