在 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
浙公网安备 33010602011771号