柚子Nan--回归原点

Everything can be as easy as you like or as complex as you need.
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

今天有幸看到几个接口的原形

Posted on 2004-07-14 21:46  柚子Nan  阅读(1239)  评论(6编辑  收藏  举报

真的是幸会啊,用了很久了,都不知道.net内部是什么?
    哪里有这些东西?
    public
interface IEnumerable

    {

        IEnumerator GetEnumerator();

    }

    public interface IEnumerator

    {

        object Current

        {

            get;

        }

        bool MoveNext();

        void Reset();

    }

    public interface ICollection:IEnumerator

    {

        int Count{get;  }

        object SyncRoot{get;}

        bool IsSynchronized{get;}

        void CopyTo(Array array,int index);

    }

    public interface IList:ICollection,IEnumerator

    {

        object this[int index]

        {

            get;

            set;

        }

        bool IsReadOnly

        {

            get;

        }

        bool IsFixedSize

        {

            get;

        }

        int Add(object value);

        bool Contains(object value);

        void Clear();

        int IndexOf(object value);

        void Insert(int index,object value);

        void Remove(object value);

        void RemoveAt(int index);

 

    }