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


Please Help Members By Posting Answers For Below Questions

From a versioning perspective, what are the drawbacks of extending an interface as opposed to extending a class?

726


What is the use of list in c#?

635


Why dependency injection is used in c#?

668


How to use reflection to call generic method?

641


What are verbatim strings in c#?

653






Define boxing and unboxing in c#?

648


How do I make a dll in c#?

673


How does bitwise xor work?

623


How big is a float?

674


What is difference between function and method in c#?

613


Difference between call by value and call by reference in C#?

712


Why would you use a class property in c#?

658


What can you do as a .net developer?

658


How long has c# been around?

716


Explain the concepts of cts and cls(common language specification).

709