In article <eg**************@TK2MSFTNGP04.phx.gbl>, "Ignacio Machin
\( .NET/ C# MVP \)" <machin TA laceupsolutions.comsays...
Hi,
"Steven Garrad" <st******@hot-nospam-mail.comwrote in message
news:08**********************************@microsof t.com...
Hi All
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?
you have to use the "new" keyword to hide the parent implementation:
new public XXXX SizeMode{
I do not remmber that SizeMode returns that's why the XXXX
... though there's nothing to stop a user casting your class to a
PictureBox, and using the original SizeMode property.
The only way to completely hide it is to encapsulate a PictureBox
internally, rather than deriving from it.