Mike9900 <Mi******@discussions.microsoft.com> wrote:
I think there is a way to hide some inherited members of a drived class. I
did not mean only a TextBox.
No, there isn't. You can override the implementation of virtual methods
and make them throw exceptions, and you can create "new" methods which
"hide" other methods to some extent, but the latter wouldn't stop
someone from doing:
BaseClass f = new DerivedClass();
f.SomeMethod();
in which case the base class SomeMethod is called, rather than the
"hiding" method in DerivedClass.
(If DerivedClass *overrides* SomeMethod, then obviously it's that
overriding version which is called.)
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too