MS source code here
In .net List<T>
class inherit two interface
(IList<T>
and System.Collections.IList
)
And it implement two method add method
public void Add(T item) {
if (_size == _items.Length) EnsureCapacity(_size + 1);
_items[_size++] = item;
_version++;
}
int System.Collections.IList.Add(Object item)
{
ThrowHelper.IfNullAndNullsAreIllegalThenThrow<T>(item, ExceptionArgument.item);
try {
Add((T) item);
}
catch (InvalidCastException) {
ThrowHelper.ThrowWrongValueTypeArgumentException(item, typeof(T));
}
return Count - 1;
}
first method is public, second is private method.
IList have no add method, but System.Collections.IList did
What is the concept of inherit from System.Collections.IList?