what is the difference between interface and abstraction?

Answer Posted / navin c. pandit

In Interface, all the member functions are abstract implicitly
so it is imp. to define all fn. declared inside Interface.
Moreover, we cann't define a fn. or we cann't declare any
member variable in an Interface. Also, we cann't declare or
define any non-abstract method in Interface.

In Abstract class, we can declare an abstract method as well
as we can also define a non-abstract method. We can also
declare a variable member in abstract class.

In both the condition, declared abstract method is
implemented out side the class i.e in derived class which
inherits Interface/Abstract class, whatever you have used.

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a interface in c#?

475


Is post back in c#?

521


What operator means?

487


What is a namespace server?

478


What are c# attributes and its significance?

525






What is difference between static and readonly in c#?

454


What is a property in c#?

476


What is a Command Object in C#?

554


Can an int be negative c#?

585


Are c# references the same as c++ references?

550


How do you escape a character?

491


What is the property of a class in c#?

498


How do I create a dbml file?

486


Show us in simple steps to create setup & deployment project for windows application?

501


Is exe is machine dependent?

500