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

If the interface in c# only contains the declaration of the methods and we need to define those methods in the class, then why we use the interface?

559


Explain the difference between and xml documentation tag?

498


What are virtual destructors?

505


What is the use of ienumerable?

452


What is a satellite assembly in c#?

546






What are classes in c#?

577


Is std :: string null terminated?

488


What is datatable in c#?

486


What is asenumerable in c#?

486


What do you mean by expression tree?

444


Classes and structs can be declared as static, is this statement true or false?

549


What is a linq in c#?

477


What is difference between destructor and finalize?

437


What is the difference between writeline and write in c#?

424


What is inheritance in csharp?

517