I don't remember when I wrote generic class last time. Every time I think I need it after some thinking I make a conclusion I don't.The second answer to this question made me to ask for clarification (since i can't comment yet, i made a new question).So let's take given code as an example of case where one needs generics:public class Repository<T> where T : class, IBusinessOBject{  T Get(int id)  void Save(T obj);  void Delete(T obj);}It has type constraints: IBusinessObjectMy usual way of thought is: the class is constrained to use IBusinessObject, so are the classes that use this Repository are. Repository stores these IBusinessObjects, most likely clients of this Repository will want to get and use objects through IBusinessObject interface. So why not just topublic class Repository{  IBusinessOBject Get(int id)  void Save(IBusinessOBject obj);  void Delete(IBusinessOBject obj);}Tho, the example is not good, as it is just another collection type and generic collection is classics. In this case type constraint looks odd too. In fact the example class Repository<T> where T : class, IBusinessbBject looks pretty much similar to class BusinessObjectRepository to me. Which is the thing generics are made to fix.The whole point is: are generics good for anything except collections and don't type constraints make generic as specialized, as the use of this type constraint instead of generic type parameter inside the class does?
Generics vs common interface?
c#;object oriented;interfaces;generics