Abstract Class vs Interface in C#

sam
sam
134 Points
62 Posts

What is the difference between an interface and abstract class? This is an extremely common interview question.

Thanks in advance

Views: 8146
Total Answered: 1
Total Marked As Answer: 1
Posted On: 09-Jan-2016 07:10

Share:   fb twitter linkedin
Answers
Kailash Singh
Kailash...
Participant
66 Points
28 Posts
Marked as answer      

Hello Sam, the basic difference between Abstract Class and Interface is-

1)- Abstract class dosen't  provide a fully abstraction. whereas Interface provide a fully abstraction.

2)- Abstract Class allows Variable declartion and method declartion both. whereas Interface only allows method declartion.

3)- Abstract Class can have access modifier, by default everything is private. But Interface doesnt use access modifier by default everthing is public

4)-Abstract class provide parameterless constructor. where as constructor not used in Interface.

5)-Abstract class not allow multiple inheritance . where as Multiple Inheritance is possible by Interface.

Posted On: 14-Jan-2016 10:21
great man..
 - andro  04-Oct-2018 08:16
banner

Blog

Active User (2)

 Log In to Chat