Re: Class Inheritance

From: Cindy Winegarden (cindy.winegarden_at_mvps.org)
Date: 07/08/04


Date: Wed, 7 Jul 2004 23:25:02 -0400

Hi UberGoober,

Here's an interesting discussion of exactly this issue:
http://tinyurl.com/26vdb. One suggestion was to have a parent class that
Class A and Class B both inherit from and have the property in question be
part of Class A but not of Class B.

-- 
Cindy Winegarden  MCSD, Microsoft Visual FoxPro MVP
cindy.winegarden@mvps.org  www.cindywinegarden.com
"ubergoober" <ubergoober@discussions.microsoft.com> wrote in message
news:F9DE683E-013A-40B2-A4B5-9A0D448A6209@microsoft.com...
> Hi,
>
> I have Class A, and I would like my Class B to inherit from Class A
because they are conceptually common classes.  My problem is that Class A
has a property that I don't want Class B to have.  Is there any way to hide,
or not inherit, properties of the parent class?  Btw, I'm coding in C#, in
case that makes a difference........


Relevant Pages

  • Re: Code generation
    ... Nick Hodges (CodeGear) wrote: ... parent class -- if that is the way your component peristence worked. ... It will give the "B' does not inherit A'" sydrome. ... You must know about the runtime subtyping, ...
    (borland.public.delphi.non-technical)
  • Re: CLOS question
    ... If you don't want to inherit these ... you simply don't mix the parent class into your class. ... indeed a pain ... ... :after methods to appear only under a call-next-method. ...
    (comp.lang.lisp)
  • Handling a network reply - best method?
    ... connect dependant on the sent request from the client. ... I want all the network code i have done to be in one class and then i want ... to inherit that class for a new class which i will put all my application ... function when the parent class gets a datareceive? ...
    (microsoft.public.win32.programmer.networks)
  • Re: Modules in rails? ( controllers or models?)
    ... So I am thinking to create a parent class and then the sub ... But rails already inherits from ActiveRecord ... So how can I inherit from others classes. ...
    (comp.lang.ruby)
  • Re: "Vector" Equivalent
    ... It still requires having to inherit and redeclare which is ... ANYWAY (and currently re-implement also - the suggestion eliminates the ... I am convinced that my suggestion is a good one (actually Loren's ... generics should be considered to address the need as you perceived it, ...
    (borland.public.delphi.non-technical)