DEV Community

Discussion on: How do you choose between an interface and abstract class?

Collapse
 
mathieuhalley profile image
Mathieu Halley

Practically, one use I've found for interfaces is to tag classes. The the interface isn't needed by the program, but having it there helps you to understand the purpose of a given class e.g.: "class UIHandler : IClickHandler, IDragHandler"

Collapse
 
suhas_chatekar profile image
Suhas Chatekar

Nice trick.