View Single Post
  #5 (permalink)  
Old 06-14-2008, 03:43 AM
ferranb ferranb is offline
Member
 
Join Date: Jun 2008
Posts: 22
ferranb is on a distinguished road
Use abstract classes when you want to "force" to derived classes to implement some code.

Use interfaces when you want to define a behavior that can define any class that implement it on different hierarchies. When a class implements an interface is saying "I'm able to do that especific thing". When you subclass a class you are saying "I'm like my parent and more".

Ferran

Ferran
Reply With Quote