I got the thread from MSDN about when to create interfaces.really it will helpful to understand the need of the creating interface. some points from the thread.
-
Interfaces are better suited to situations in which your applications require many possibly unrelated object types to provide certain functionality.
-
Interfaces are more flexible than base classes because you can define a single implementation that can implement multiple interfaces.
-
Interfaces are better in situations in which you do not have to inherit implementation from a base class.
-
Interfaces are useful when you cannot use class inheritance. For example, structures cannot inherit from classes, but they can implement interfaces.
No comments:
Post a Comment