4 Years
Discussion Span
Last Post by hericles

The biggest difference between the two (to me) is that interfaces don't contain implemented methods. They only define the structure that the inheriting class must take, whereas abstract classes can be partially or fully implemented with complete methods. Interfaces are usually said to be a contract that the developer must adhere to - the methods you need to create are specified but you have complete freedom as to how they are implemented.
The choice to use one of the other comes down to how you intend the class/interface to be used.
Things to consider are that interfaces cannot be changed after being released (without breaking all code that inherits from them), abstract classes can be extended/altered and the inheriting classes immediately gain the new functionality.
This link at MSDN gives some good examples of when to use one over the other.

Votes + Comments
Well explained!
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.