Features | Interface | Abstract Class |
Inheritance | A class may inherit several interfaces. | A class may inherit only one abstract class. |
Code | An interface contains only signature but no code | An abstract class can contain complete, default code and/or just signature that have to be overridden. |
Access Modifiers | An interface cannot have access modifiers | An abstract class can contain access modifiers |
Defines | Interfaces are used to define the peripheral abilities of a class | Abstract class defines the core identity of a class and there it is used for objects of the same type. |
Homogeneity | If various implementations only share method signatures then it is better to use Interfaces. | If various implementations are of the same kind and use common behaviour or status then abstract class is better to use. |
Fields | No fields can be defined | Fields can be defined |
Difference between Interface and Abstract Class
Compare Interface with Abstract Class
Subscribe to:
Post Comments (Atom)
Popular Posts
-
Answer : WCF belongs to System.ServiceModel
-
Different types of assemblies are : Static and Dynamic assemblies Private and Shared assemblies Single file and Multiple file assemblies ...
-
Authorization is used to determine whether user has access to resource or not. There are two ways to authorize a resource : File authoriza...
-
Operation behaviour are scoped at Operation level. It is used for transaction flow , serialization , parameter handling.
-
Different type of method parameters in C# are : Value Parameter Reference Parameter Output Parameter
-
Abstract class has following features : cannot be instantiated contain abstact methods and properties cannot modify abstract class with s...
-
OOPs concepts that C# supports are : Abstraction : is a process that involves identifying the crucial behavior of an object and eliminatin...
-
Characteristics of well designed normalized database are : Table should have identifier Table should store data for single type of entity...
-
There are five types of contracts : Service Contract Operation Contract Data Contract Message Contract Fault Contract Please refer be...
1 comment:
Good help..
Post a Comment