What is the difference between Abstract and Interface?

Answer Posted / nevin jain

-Abstract class contains both data members n members
functions.... but Interface contains only members functions

-Abstract class contains both complete n incomplete methods,
incomplete methods has to be explicitly marked as abstract
method...where as Interface contains all incomplete method n
no abstract keyword is requires explicitly.

-Abstract class n theirs members can be public,private or
protected whereas... By default access modifier are public n
no other access modifier can be given to interface n theirs
members.

-Abstract class members are inherit into derived class as
inherit members whereas... Interface members as inherited as
prototype members..

-Abstract class contain constructor whereas.. interface does
not contain..

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is appdomain in c#?

490


Why do we use yield in c#?

508


Define multicast delegate? How it be used?

601


What are managed providers?

549


What is the task perform by clr?

577






Is overriding of a function possible in the same class?

473


Which is faster abstract class or interface in c#?

544


Write a sample code to write the contents to text file in c#?

483


Why to use “using” in c#?

559


What are the examples of data types?

488


What are the properties of a string class?

515


Why cannot you specify the accessibility modifier for methods inside the interface?

495


What is console programming language?

487


Define thread?

586


What is difference between ienumerable and list in c#?

455