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

Is post back c#?

728


Explain the difference between a Private Assembly and a Shared Assembly

756


Are objects passed by reference in c#?

761


What is collection class c#?

717


How can we sort an array in c#?

739


What is serialization in .net?

797


Why do I get a "cs5001: does not have an entry point defined" error when compiling?

779


What is var c#?

706


What is class in oops with example in c#?

704


I wish to create a windows application to perform a similar function as that of the "Search" which is provided to look for related files and folders in the System.. What steps must i follow??

1742


What is a service layer c#?

665


How to declare a property in a class?

783


Which is the base class in c#?

724


What is an inheritance in c#?

693


Is hashset serializable c#?

732