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

Showing Answers 1 - 1 of 1 Answers

vvbabu

  • Jul 31st, 2005
 

The process of deriving a new class from an existing class is called Inheritance.  
The old class is called the base class and the new class is called derived class.  
The derived class inherits some or everything of the base class.  
In Visual Basic we use the Inherits keyword to inherit one class from other.
 
 
Ex: 
 
Public Class Base 
--- 
--- 
End Class 
 
Public Class Derived 
Inherits Base 
--- 
--- 
End Class

  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