在 Visual C# .NET 中实现自定义集合
摘要:
View Code usingSystem;usingSystem.Collections;classTempClass{publicclassCustomCollection:ICollection{privateint[]intArr={1,5,9};privateintCt;publicCustomCollection(){Ct=3;}voidICollection.CopyTo(ArraymyArr,intindex){foreach(intiinintArr){myArr.SetValue(i,index);index=index+1;}}IEnumeratorIEnumerable 阅读全文
posted @ 2011-04-22 10:23 tssing 阅读(409) 评论(0) 推荐(0) 编辑