This is how looks IList<T>
generic interface
public interface IList<T> : ICollection<T>, IEnumerable<T>, IEnumerable
{
T this[int index] { get; set; }
int IndexOf(T item);
void RemoveAt(int index);
}
Why IList<T>
extends both IEnumerable<T>
and IEnumerable
interfaces?
IEnumerable<T>
already have IEnumerable
. Same thing is with ICollection<T>
interface.