Difference between abstract class and interface

Answer Posted / mkm

)1. Accessibility modifier(Public/Private/internal) is
allowed for abstract class.
Interface doesn't allow accessibility modifier

2. class can inherit only one abstract class
class can implement more than one interface.

(2) An abstract class can contain fields,
constructors, or destructors and implement properties. An
interface can not contain fields, constructors, or
destructors and it has only the property's signature but no
implementation.
(3) An abstract class cannot support multiple
inheritance, but an interface can support multiple
inheritance. Thus a class may inherit several interfaces
but only one abstract class.
• Interface is used to "implements"; whereas abstract class
is used to "extends".
• Interface can be used to achieve multiple inheritance;
abstract class can be used as a single inheritance.

Is This Answer Correct ?    13 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is application session?

497


How can I configure asp.net applications that are running on a remote machine?

531


What is manifest in .net framework?

534


How will you do Redo and Undo in a TextControl?

664


What is a global postback url?

505






What is autopostback in dropdownlist in asp net?

523


What is asp.net version?

521


How do you design a website with multilingual support in ASP.NET ?

538


Describe the Server Control Events of ASP.NET?

645


What is difference between session and cookies in asp net?

496


can any one find and tell the difference between dot net and php which one is best ? which one we get more salary? which one is stable and which one is best for freshers and also better in future and carrer ? which one we wil get more salary sir ? please send ur valuable suggestions to kiranpulsar2007@gmail.com

1474


What type of code, client-side or server-side, is found in a code-behind file of a Web page?

577


They mostly asked difference between versions of technologies

934


What is http only cookie?

494


What is ascx?

523