[C#]System.Collections简介

本文介绍了System.Collections命名空间下的非泛型集合类及接口,包括ArrayList、BitArray、Queue、Stack、Hashtable、SortedList等集合类,以及ICollection、IComparer、IList、IDictionary、IEnumerator等接口。

System.Collections命名空间包含可使用的集合类和相关的接口。

该命名空间下的.NET非泛型集合类如下所示:

— System.Collections.ArrayList:数组集合类,使用大小可按动态增加的数组实现Ilist接口。
— System.Collections.BitArray:布尔集合类,管理位值的压缩数组,该值为布尔值。
— System.Collections.Queue:队列,表示对象的先进先出集合。
— System.Collections.Stack:堆栈,表示对象的简单的后进先出集合。
— System.Collections.Hashtable:哈希表,表示键/值对的集合,这些键/值对根据键的哈希代码进行组织
— System.Collections.SortedList:排序集合类,表示键/值对的集合,这些键和值按键排序并可按键和索引访问。

该命名空间下的.NET非泛型接口如下所示:

— System.Collections.ICollection:定义所有集合的大小,枚举器和同步方法
— System.Collections.IComparer:比较两个对象的方法
— System.Collections.IList:表示可按照索引单独访问一组对象
— System.Collections.IDictionary:表示键/值对的集合
— System.Collections.IDictionaryEnumerator:枚举字典的元素
— System.Collections.IEnumerator:支持在集合上进行简单迭代

转载于:https://www.cnblogs.com/lihaozy/archive/2010/11/04/1868709.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值