首页 > 其他 > 详细

CollectionBase类

时间:2015-03-03 21:51:22      阅读:196      评论:0      收藏:0      [点我收藏+]

在命名空间System.Collections下的CollectionBase类

The CollectionBase class exposes the interfaces IEnumerable , ICollection , and IList but only

CollectionBase 类有IEnumerable , ICollection , and IList三个接口,
provides some of the required implementation — notably, the Clear() and RemoveAt() methods of

但是只提供了需要的实现,尤其是IList接口的Clear和RemoveAt方法
IList and the Count property of ICollection . You need to implement everything else yourself if you

以及ICollection 接口的Count属性。如果你想要使用提供的功能,就需要自己实现
want the functionality provided.

 

为了便于操作,CollectionBase 提供了2个受保护的属性,List属性以及InnerList属性。

List属性可以通过IList接口访问元素,InnerList则是用于存储元素的ArrayList对象

CollectionBase类

原文:http://www.cnblogs.com/chucklu/p/4311852.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!