What is the difference between Abstract and Interface?

Answer Posted / muhammad hussain wazir pakista

1: Abstract class contains abstract and non abstract methods
while interface contains all abstract methods.

2: Interface only contain definition of method no
implementation but Abstract class can have this quality.

3: We can not create object of abstract class.
4: We can create constructor and Destructure Abstract class
can while this can be do in Interface.
5: In interface all methods are abstract and have no keyword
of Abstract with method.

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to prevent a class from being inherited in c#.net?

692


What is a copy constructor in c#?

701


what is IDisposal interface

903


What are the different types of delegation?

633


What is difference between continue and break in c#?

679


What is the difference between internal and protected in c#?

637


How garbage collection deals with circular references.

624


Define acid rule of thumb for transactions in c#.

652


Are structs faster than classes?

704


What is a static field?

667


What is the use of readkey in c#?

708


What is type checking in c#?

679


Explain dataadapter.update method in .net?

730


What is boolean method?

702


What is the main purpose of delegates in c#?

718