GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  DotNet
Go To First  |  Previous Question  |  Next Question 
 DotNet  |  Question 117 of 165    Print  
How different are interface and abstract class in .Net?

  
Total Answers and Comments: 9 Last Update: December 11, 2008     Asked by: Prasad 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
May 26, 2006 02:22:37   #1  
Chandra kumar        

RE: How different are interface and abstract class in ...

Abstract Class - Blue print of class

Interfaces - Only implemented members such as property index methods events


 
Is this answer useful? Yes | No
May 27, 2006 05:47:09   #2  
Ashishtandon.e Member Since: March 2006   Contribution: 14    

RE: How different are interface and abstract class in ...

Abstract classes can not be instantiated it can have or cannot have abstract method basically known as mustinherit as the methods are static in nature

where interfaces are the declaration and r defined where they are called used for dynamic methods


 
Is this answer useful? Yes | No
June 12, 2006 08:32:30   #3  
rekhs        

RE: How different are interface and abstract class in ...

Hai

Abstract class: It can't be instantiated.Some methods may abstract. It can't be implemented. It bis the blueprint of the class.

Interface: It can be instantiated.All the methods should be abstract. it can be implemented


 
Is this answer useful? Yes | No
June 19, 2006 06:19:38   #4  
debiprosad lahiri        

RE: How different are interface and abstract class in ...

Abstract class is a class which can only be inherited by a subclass whereas in an interface only some signatures will be provided. In case of interface the class that will implement this must write code against each methods / functions. Interface can inherit other interface only where an abstract class can inherit other classes . When my base class will be used by more than one group of user and they all might not use all the methods that my class will provide in that case we should go for an abstract class rather than an interface.

Public MustInherit class A

Interface A


 
Is this answer useful? Yes | No
July 28, 2006 04:59:39   #5  
venkat        

RE: How different are interface and abstract class in ...

1.We can't create instances for both

2.Single inheritance in abstract class multible inheritance in interface

3.We can have concrete method in abstact class but not in the interface.

4.Any class that needs to use abstract must extent

5.Any class that needs to use interface must implement

5.Interface all the variables are static and final.


 
Is this answer useful? Yes | No
September 22, 2006 04:01:10   #6  
diksha        

RE: How different are interface and abstract class in ...

abstract classes can have some methods dclared only not defined these methods are later definedin classes that will inherit abstract class

interface will have no method defined methods are only declared they are defined in class which implements interface

interface is implemented

abstract class is inherited


 
Is this answer useful? Yes | No
October 16, 2006 09:29:46   #7  
praveenoruganti        

RE: How different are interface and abstract class in ...
interface is nothing but no functionality with some definition in it.
 
Is this answer useful? Yes | No
February 02, 2007 14:47:44   #8  
Leelakrishnan        

RE: How different are interface and abstract class in ...
Hi Inferface can be used as a contract for other classes.
 
Is this answer useful? Yes | No
December 08, 2008 02:07:23   #9  
biswo123 Member Since: December 2008   Contribution: 1    

RE: How different are interface and abstract class in .Net?
- Abstract class contains one or more incomplete methods while an interface contains only the signatures of all the methods.
 
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