Re: changing access modifier of base method
- From: jonpb <nospam@xxxxxxxxxx>
- Date: Tue, 22 Jan 2008 15:12:22 -0800
Fredo wrote:
The object is dialogue, so ShowDialog should be used at all times, it makes no sense to call Show. On top of that I overloaded ShowDialog to initialize the title and prompt in the InputBox, so, in fact I would like to hide the base ShowDialog as well.
Why are you trying to hide the methods? Maybe there's another way to handle your problem.
Once again, I disagree with the hard-line definitions of OOP. I see no philosophical reason to disallow changing access modifiers on base methods, especially in this case where the base is a general purpose class and the derived is a specialization of the base. But I guess that's just me. The argument that there is nothing stopping the user from casting to Form and calling Show is, in this case, invalid, kind like saying, in C++ that you can change the value of a reference, sure you can, but who in their right mind ever would.
Anyways, as for this class, the purpose of hiding the methods is for completeness, no one will ever use them and it's kind of an annoyance to see them in intellisense.
.
- Follow-Ups:
- Re: changing access modifier of base method
- From: Peter Duniho
- Re: changing access modifier of base method
- From: Scott Roberts
- Re: changing access modifier of base method
- From: Fredo
- Re: changing access modifier of base method
- References:
- changing access modifier of base method
- From: jonpb
- Re: changing access modifier of base method
- From: Fredo
- changing access modifier of base method
- Prev by Date: Capture Scroll Event in List Box...
- Next by Date: Re: which one is faster/better > or >=
- Previous by thread: Re: changing access modifier of base method
- Next by thread: Re: changing access modifier of base method
- Index(es):
Loading