What is the difference between Abstract and Interface?

Answer Posted / munwar

Interface and abstract class are just same,but both have
their own usability and advantages..

Difference b/w both.
1). Interface is highlevel abstract(means there is no
single implementation), but in abstract class there can be
implementation.
2)Interface does not allow accessfiers like
public,private.. but abstract class allow these accessifiers

3) Interface does not supports contant values but abstract
calss supports constatnt values..

4) Interface supports multiple inheritance but class does
not support multiple inheritance..

5).interface can not implement abstract class but abstract
calss can impelment interface...

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is join in c#?

484


Can enum be null c#?

521


What namespace is list in c#?

491


Illustrate serialization?

513


Can dictionary have duplicate keys c#?

500






Why interface is required?

465


Explain the features of an abstract class in net.

502


What is difference between array and list?

493


Is learning c# hard?

510


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

518


Is cli same as the clr?

519


What is ilasm.exe used for?

510


Describe an abstract class?

559


What do you mean by object pooling?

528


What is a void c#?

510