Interface vs Base class
问题 When should I use an interface and when should I use a base class? Should it always be an interface if I don\'t want to actually define a base implementation of the methods? If I have a Dog and Cat class. Why would I want to implement IPet instead of PetBase? I can understand having interfaces for ISheds or IBarks (IMakesNoise?), because those can be placed on a pet by pet basis, but I don\'t understand which to use for a generic Pet. 回答1: Let's take your example of a Dog and a Cat class, and