集合接口

public interface IList : ICollection
{
    Object this[int index] { get; set; }

    int Add(Object value);

    bool Contains(Object value);

    void Clear();

    bool IsReadOnly { get; }

    bool IsFixedSize { get; }

    int IndexOf(Object value);

    void Insert(int index, Object value);

    void Remove(Object value);

    void RemoveAt(int index);
}
public interface ICollection : IEnumerable
{
    void CopyTo(Array array, int index);

    int Count { get; }
}
public interface IEnumerable
{
    IEnumerator GetEnumerator();
}

 

 

public interface IList<T> : ICollection<T>
{
    T this[int index] { get; set; }

    int IndexOf(T item);

    void Insert(int index, T item);

    void RemoveAt(int index);
}
public interface ICollection<T> : IEnumerable<T>
{
    int Count { get; }

    bool IsReadOnly { get; }

    void Add(T item);

    void Clear();

    bool Contains(T item);

    void CopyTo(T[] array, int arrayIndex);
    
    bool Remove(T item);
}
public interface IEnumerable<out T> : IEnumerable
{
    new IEnumerator<T> GetEnumerator();
}

 

posted @ 2016-11-24 23:14  茗::流  阅读(88)  评论(0)    收藏  举报
如有雷同,纯属参考。如有侵犯你的版权,请联系我。