Results 1 to 5 of 5

Thread: "new" modifier explicitly hide a member inherited from a base class in C#

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2007
    Posts
    21
    Thanks
    2
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question "new" modifier explicitly hide a member inherited from a base class in C#

    Hello,

    "new" modifier explicitly hide a member inherited from a base class in C#..
    Is there any alternative in C++ which can be used like this..
    as shown below..

    Qt Code:
    1. public class MyBaseC
    2. {
    3. public int x;
    4. public void Invoke() {}
    5. }
    To copy to clipboard, switch view to plain text mode 
    Declaring a member with the name
    Invoke
    in a derived class will hide the method
    Invoke
    in the base class, that is:

    Qt Code:
    1. public class MyDerivedC : MyBaseC
    2. {
    3. new public void Invoke() {}
    4. }
    To copy to clipboard, switch view to plain text mode 

    here member function Invoke() in class MyDerivedC is hidden from the base MyBaseC...

    -->> how can i implement this similar thing in C++...

    Regards,
    Kunal nandi.
    Last edited by jpn; 17th March 2008 at 20:31. Reason: missing [code] tags

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.