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
What is data type in c# with example?
Is is possible to force garbage collector to run?
Explain manifest & metadata in c#.
Is datetime a value type in c#?
Is lazy thread safe c#?
What is the resgen.exe tool used for?
Is exe is machine dependent?
What's the difference between a method and a procedure?
Can constructor be private c#?
How many types of polymorphism are there?
What is the implicit name and type of the parameter that gets passed into the class set method?
Can list contain duplicates c#?
How many bits is int32?
How can you read 3rd line from a text file?
Why do we use static methods in c#?