- What are the cons/risks of base class implementing an interface?
- Is it better to always implement an interface on the sub-class?
When would you use one or the other?
public interface IFriendly { string GetFriendly(); } public abstract class Person: IFriendly { public abstract string GetFriendly(); }
VS.
public interface IFriendly { string GetFriendly(); } public abstract class Person { // some other stuff i would like subclasses to have } public abstract class Employee : Person, IFriendly { public string GetFriendly() { return "friendly"; } }