When planning out my programs, I often start with a chain of thought like so:
A football team is just a list of football players. Therefore, I should
When is it acceptable?
To quote Eric Lippert:
When you're building a mechanism that extends the
List
mechanism.
For example, you are tired of the absence of the AddRange
method in IList
:
public interface IMoreConvenientListInterface : IList
{
void AddRange(IEnumerable collection);
}
public class MoreConvenientList : List, IMoreConvenientListInterface { }