Re: denying inheritance

From: jeffc (nobody_at_nowhere.com)
Date: 10/29/03

  • Next message: Jumbo: "Re: 0.1 = 0 ???"
    Date: Wed, 29 Oct 2003 15:15:53 -0500
    
    

    "Micah Cowan" <micah@cowan.name> wrote in message
    news:m33cdbu8rx.fsf@localhost.localdomain...
    >
    > Simply don't declare them "virtual". They'd still be able to
    > derive from the class, and still override the member
    > functions...

    If they're not virtual, then they can't be overridden. Unless by that you
    mean redefined.

    > Not having a virtual destructor really should keep sane people
    > from deriving from your class most of the time, I hope.

    The type of person that doesn't care to read the documentation for the class
    they're inheriting from certainly isn't going to notice something that
    obscure.


  • Next message: Jumbo: "Re: 0.1 = 0 ???"

    Relevant Pages

    • RE: VS 2005 Classname Drop down
      ... In VB.NET 2005, to override a method/property in an inherited class, open ... member in the list. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
      (microsoft.public.dotnet.general)
    • Overriding interface members
      ... And I want to override ... Declaring the member with override, ... my interface member completely replaces the member ... from the base class. ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: denying inheritance
      ... "Gary Labowitz" writes: ... and still override the member ... >> Not having a virtual destructor really should keep sane people ...
      (alt.comp.lang.learn.c-cpp)
    • Re: denying inheritance
      ... "Micah Cowan" wrote in message ... and still override the member ... Dumb question: can you inherit from a class if you don't have the source? ...
      (alt.comp.lang.learn.c-cpp)
    • Re: .equals(o) and Set membership
      ... in which i have override the Object.equals ... > objects) and if another member of the class contains the same two objects ... > if i'm correct in reading the docs about how Set classes work, ... > method, which at runtime should bind to my overridden method, no? ...
      (comp.lang.java)