Abhishek Tyagi
How to hide the base class functionality in Inheritance?
By Abhishek Tyagi in OOP/OOD on Oct 11 2012
  • Rahul Prajapat
    Jun, 2015 3

    We can use new operator to hide the base class functionality.

    • 1
  • Pankaj  Kumar Choudhary
    Mar, 2015 25

    We can use new operator to hide the base class functionality......

    • 1
  • Bhabani Prasad
    May, 2014 24

    using virtual method in base class and override in child class.And also using new class without declaring virtual and override

    • 1
  • Bhabani Prasad
    May, 2014 24

    using virtual method in base class and override in child class.And also using new class without declaring virtual and override

    • 1
  • sumank
    May, 2013 10

    If you are using sealed method then it is not going to be overridden in derived class, but you want to hide then you have to use 'new' in base class.You can use 'New' keyword with data as well as with method of the class to hide it in inheritance.

    • 1
  • shravan kumar
    Apr, 2013 30

    Hi! if u want to hide base class functionality,use "New" keyword instead of Sealed.Because,Sealed classes are used to restrict the inheritance feature of object oriented programming. Once a class is defined as sealed class, this class cannot be inherited.One of the best usage of sealed classes is when you have a class with static members. For example, the Pens and Brushes classes of the System.Drawing namespace.

    • 1
  • masthan p
    Dec, 2012 2

    using new keyword

    • 1
  • suresh kumar behera
    Oct, 2012 26

    if we declare those functionality which we dont want to inherited in child class then we have to use sealed keyword.

    • 1
  • balaji R
    Oct, 2012 12

    you can hide the base class functionality by using the new keyword

    • 1


Most Popular Job Functions


MOST LIKED QUESTIONS