迭代器模式
摘要:
public interface IEnumerable{IEnumerator GetEnumerator();} public interface IEnumerator { int Current { get;} bool MoveNext(); void Reset(); } public class MyCollection:IEnumerable { public int[] items; public MyCollection() { items = ... 阅读全文
posted @ 2013-04-12 15:32 HOT SUMMER 阅读(117) 评论(0) 推荐(0) 编辑