Can you explain what inheritance is and an example of when you might use it?

Showing Answers 1 - 3 of 3 Answers

Sridhar

  • Jul 9th, 2005
 

Inheritance is the ability of the derived from the base class. 
When you want to inherit (use the functionality of) another class. Example: With a base class named Employee, a Manager class could be derived from the Employee base class.

  Was this answer useful?  Yes

Iyyappan

  • Jul 20th, 2005
 

The methods and procedures of one class is used by another class is named as Inheritence.  
 
Ex:  
Public Classs BaseClass 
Public Overridable Sub OverridingMethods() 
MessageBox.Show ("BaseClass") 
End Sub 
End Class 
 
 
Public Classs DerivedClass  
Inherits BaseClass 
Public Overridable Sub OverridingMethods() 
MessageBox.Show ("ChildClass") 
End Sub 
End Class 
 

  Was this answer useful?  Yes

satyambabu53

  • Jul 3rd, 2006
 

Inheritance means able to inherete the class from base class. The inherete class called derived class.The main advantage of the inheritance if any modification done origanl class safe.This is for reusable.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions