GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  DotNet
Go To First  |  Previous Question  |  Next Question 
 DotNet  |  Question 18 of 165    Print  
Can you explain what inheritance is and an example of when you might use it?

  
Total Answers and Comments: 3 Last Update: July 03, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 09, 2005 01:43:33   #1  
Sridhar        

RE: Can you explain what inheritance is and an example of when you might use it?
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.

 
Is this answer useful? Yes | No
July 20, 2005 23:07:41   #2  
Iyyappan        

RE: Can you explain what inheritance is and an example of when you might use it?
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


 
Is this answer useful? Yes | No
July 03, 2006 13:51:05   #3  
satyambabu53 Member Since: July 2006   Contribution: 8    

RE: Can you explain what inheritance is and an example...
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.
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape