Re: "Hiding" an inherited property?

From: Paul E Collins (find_my_real_address_at_CL4.org)
Date: 04/13/04


Date: Tue, 13 Apr 2004 17:59:50 +0000 (UTC)


"Jacob" <jacobslusser@REMOVETHIShotmail.com> wrote:

> Is there a way to make a property of an inherited
> class invisible to the programmer? I know that
> using the keyword "new" allows you to create
> another property in the place of the existing one, but
> how can I make the property hidden and not available
> at all?

I don't think you can, and it would be a very bad thing to do from an
object-oriented standpoint.

For it to be possible to treat any inherited class instance as though it
were a base class instance, the inherited class must have all of the members
of the base class.

P.



Relevant Pages

  • Re: OO problem: How to create a duplicate of a derived class with only a base variable ?
    ... > Skybuck. ... >> would only be needed to write once for the base class. ...
    (alt.comp.lang.borland-delphi)
  • Re: C++ design question
    ... >> does not initialize the specific base class instance created as a part ... >> of creating an instance of this derived class if that was the intent. ... >> class instance part if that is the intent. ...
    (comp.object)
  • Re: inheritance not working properly -- Help please!!
    ... I'll post the base class and the inherited class (definition and 1 ... PlayerInfos: CPlayerInfos, new ... public override // that's where it should pop with the Connectmethod, ... should pop with my base class methods... ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Is this proper in OO theory?
    ... particular code sample. ... there is nothing wrong with putting anything in the base class ... > public int GetANumber() ... > inherited class. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Cannot Access Base Members when Inheriting WebControl
    ... my first thought is that your base class must reside in the App_Code sub ... class members from my inherited class. ... I create a base .ascx control and add a method. ... public partial class ResumeCapture_ResumeCaptureBase: myWebControlBase ...
    (microsoft.public.dotnet.framework.aspnet)