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

write code for inserting and updating recoards in sql server database using connected architecture & records shoulds displayed in grid view ( use c# )

1927


What is the wildcard character in sql?

520


What is a namespace server?

478


What does return do in for loop?

484


What is default value of bool in c#?

530






What is multithreading? What are the problems that comes with multithreading and how to manage them?

554


What type is string in c#?

481


how to Create a datagridview control with check box column with 8rows in it, the maximum number of check boxes checked should be 3, when user checks the 4th corresponding message should be displayed and check box should be checked. User can uncheck the checked boxes Note: read-only property should not be used

2401


Is c# static or dynamic?

504


How can you reference current thread of the method ?

527


What are logical operators in c#?

526


What is lock in c#?

486


Is string passed by reference in c#?

492


What is the boxing and unboxing in c#?

502


When was .net linq added?

519