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
Can non-default constructors be used with single call sao?
Is null in c#?
How to rotate an Image in C#?
Why is it important to override gethashcode when equals method is overridden?
I have 3 overloaded constructors in my class. In order to avoid making instance of the class do I need to make all constructors to private?
what is the syntax to inherit from a class in c#?
Is lazy thread safe c#?
What is the difference between gettype and typeof in c#?
Explain About Iunknown interface Queue
What is the advantage of generics in c#?
What is icollection in c#?
What is hashset c#?
What is data binding c#?
What is public or shared assemblies ?
Enlist some of the properties of a thread class?