What is the difference between Abstract and Interface?
Answer Posted / anand
Abstract Class:
1. Abstract Class Can contain Abstract Methods and Non-
Abstract Methods.
2. When a Non-Abstract Class is Inherited from an Abstract
Class, the Non-Abstract Class should provide all the
implementations for the inherited Abstract Method.
Interface:
1. Interface is nothing but Pure Abstract Class ie
Interface can contain only the function declaration.
2. All the members of the interface are Public by Default
and you cannot provide any access modifiers.
3. When a class is inherited from the interface, the
inherited class should provide actual implementations for
the inherited members.
| Is This Answer Correct ? | 80 Yes | 18 No |
Post New Answer View All Answers
Why array is faster than arraylist in c#?
Explain the Abstract class in c#.net
What is a verbatim string literal and why do we use it?
What is the difference between ienumerable and icollection?
Why delegates are safe in c#?
What is ispostback c#?
Why is it important to override gethashcode when equals method is overridden?
Why do we use delegates in c#?
List the difference between the virtual method and the abstract method?
What is final keyword in c#?
What is default value of decimal c#?
Is enum a value type c#?
What is activator c#?
What is the difference between null and string empty in c#?
How to exclude a property from xml serialization?