Abstract Class vs Interface in C#
sam
378
Points
48
Posts
|
What is the difference between an interface and abstract class? This is an extremely common interview question. Thanks in advance |
Kailash...
206
Points
23
Posts
|
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
|