Renjith V S
Difference between Abstract class and Interface?
By Renjith V S in ASP.NET on Mar 26 2014
  • Sreekanth Reddy
    Jul, 2015 11

    Interface acts as a contract(all the methods should be implemented in derived class.) Abstract--> atleast one method should be implemented.

    • 0
  • arvind
    Jan, 2015 21

    Abstract Class: 1. Can have implementation and only signature of methods. 2. Allow access modifier e.g. Private, Protected, Public. 3. Does not force to inherited class to implement all the methods of abstract class. 4. Can have variables also. Interface : 1. Has only method signature. 2. All the methods inside interface are Public by default, does not allow private methods. 3. If a class implement an interface then interface force to class to implement it's all methods. 4. Does not allow variable inside it. 5. class can implement more then one interface.

    • 0
  • Mahesh Kumar Alanka
    Apr, 2014 26

    interface doesn't have any implementation. it just have a signature of the method. it solves Multiple Inheritence Ambiguity problem. it doesn't have access specifiersabstract class have implementation. it has access specifiers and can inherits from base class and interface.

    • 0
  • Munesh Sharma
    Apr, 2014 12

    Abstract Class V/s Interface (http://dotnet-munesh.blogspot.in/2013/12/difference.html)Abstract class can have implementation for some of its method. But the interface can't have implementation for any of its method.Abstract class can have field but interface does not have fields. An Interface can inherit from another interface only can't inherit from another abstract class but an abstract class can inherit from another abstract class and another interface. Abstract class members can have access modifiers where interface member doesn't have access modifiers.

    • 0
  • Yogesh  Tyagi
    Apr, 2014 8

    For Abstract class Visit:- http://www.dotnet-tricks.com/Tutorial/csharp/E0K2011113-A-Deep-Dive-into-CAnd For Interface Visit:- http://www.dotnet-tricks.com/Tutorial/csharp/5T27291013-A-Deep-Dive-into-C

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS