导航

2006年9月8日

摘要: 对象数组,使用foreach循环.必须要继承IEnumerable接口.实现GetEnumerator()方法.下面是一个测试用的例子. 1using System; 2using System.Collections; 3 4public class MyCollection : IEnumerable 5{ 6 protected ArrayList collection = new ... 阅读全文

posted @ 2006-09-08 18:04 Matildawaltzer 阅读(248) 评论(0) 推荐(0) 编辑