What?s the difference between an interface and abstract
class?

Answers were Sorted based on User's Feedback



What?s the difference between an interface and abstract class?..

Answer / 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

What?s the difference between an interface and abstract class?..

Answer / guest

In the interface all methods must be abstract; in the
abstract class some methods can be concrete. In the
interface no accessibility modifiers are allowed, which is
ok in abstract classes.

Is This Answer Correct ?    3 Yes 3 No

Post New Answer

More C Sharp Interview Questions

How do I calculate relative time?

0 Answers  


Explain the difference between class and interface in .net?

0 Answers  


What is Dependency of Injection?

0 Answers  


What is the advantage of singleton class?

0 Answers  


what is the main differnce between const,readonly and static

3 Answers   Beehive Systems, CDAC,






Why are there five tracing levels in System.Diagnostics.TraceSwitcher?

1 Answers  


What can I create with c#?

0 Answers  


What is a race condition?

0 Answers  


Why do we need escape characters?

0 Answers  


what is the purpose of using statement in c#

0 Answers   Cognizant,


What is the wildcard character in SQL? Let?s say you want to query database with LIKE for all employees whose name starts with La.

1 Answers  


Can you specify nested classes as partial classes?

0 Answers  


Categories