Abstract Class vs Interface in C#
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:
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