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

What is default constructor in c#?

0 Answers  


What is the resgen.exe tool used for?

0 Answers  


What does assert() do in c#?

0 Answers  


i need to insert data into sql server table emp through textboxes txtname and txtsalary using c# code. Please help

1 Answers  


How can you write a class to restrict that only one object of this class can be created (Singleton class)?

0 Answers  






Does c# provide copy constructor?

0 Answers  


Is stringbuilder better than string?

0 Answers  


What is difference between a constant and read-only in C#?

0 Answers   CDC,


Why do we need ienumerable in c#?

0 Answers  


What is .cshtml file?

0 Answers  


What is method overriding in c#

0 Answers  


why delegate is type safe?

0 Answers   IBS,


Categories