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 delegates are type safe?
What is the system namespace?
What is different between Boxing and Unboxing?
What is difference between assembly and dll?
How many types of variables are there in c#?
How long can a string be c#?
What are the 2 broad classifications of fields in c#?
What is the purpose of abstract class in c#?
What is a reference type c#?
Is as operator in c#?
How is a string immutable?
What tool we have to use to install assembli in gac folder.
What are Indexers in C#?
What are the different types of classes in c#?
How to use session under class file of APP_Code folder?