What?s the difference between an interface and abstract
class?
Answer Posted / sunitha
Interface - All Methods in the Interface are abstract
Methods.So the Access Modifier is public by default which
helps the Class ABC Implementing the Interface to define
the code for the methods
Abstract - > Protected Methods can be defined & implemented
in Abstract Class. This class does some implementation of
its own & leaves the remaining implementation to the
Derived Class
1.Multiple Inheritance is possible through Interface only.
2.If we add any new method in the interface, then all the
derived class has to be altered to include the
implementation of the method.
3.Interface is on the Top Level
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
From a versioning perspective, what are the drawbacks of extending an interface as opposed to extending a class?
What is the use of list in c#?
Why dependency injection is used in c#?
How to use reflection to call generic method?
What are verbatim strings in c#?
Define boxing and unboxing in c#?
How do I make a dll in c#?
How does bitwise xor work?
How big is a float?
What is difference between function and method in c#?
Difference between call by value and call by reference in C#?
Why would you use a class property in c#?
What can you do as a .net developer?
How long has c# been around?
Explain the concepts of cts and cls(common language specification).