-1

what is the advantage of interface in c# over an abstract class if we have one method declaration. What will be a better way if we have one method only

  • possible duplicate of [Interface vs Abstract Class (general OO)](http://stackoverflow.com/questions/761194/interface-vs-abstract-class-general-oo) – jaket Aug 03 '15 at 04:48

1 Answers1

0

The number of operations is not a determining factor in deciding what is better.

The main advantage of an interface over an abstract class is that a class can implement multiple interfaces but can only inherent from one abstract class.

The advantage of an abstract class over an interface is that an abstract class can provide a default implementation of some operations.

Emond
  • 50,210
  • 11
  • 84
  • 115