What Is the Difference Between Using Generics and Using Interfaces (or Abstract Classes)?
Interfaces and generics serve different purposes. Interfaces are about defining a contract between a service consumer and a service provider. As long as the consumer programs strictly against the interface (and not a particular implementation of it), it can use any other service provider that supports the same interface. This allows switching service providers without affecting (or with minimum effect on) the client’s code. The interface also allows the same service provider to provide services to different clients. Interfaces are the cornerstone of modern software engineering, and are used extensively in past and future technologies, from COM to .NET to Indigo and SOA. Generics are about defining and implementing a service without committing to the actual types used. As such, interfaces and generics are not mutually exclusive. Far from it, they compliment each other. You can and you should combine interfaces and generics.