C#Dictionary 字典、泛型

继承自System.Collection.Generic,Dictionary里面每一个元素都是一个键值对(两个元素组成:键和值);

键唯一,值不需要唯一;

ex:Dictionary<string,string> example=new Dictionary<string,string>();

 

泛型最常用的用途是泛型集合,命名空间System.Collection.Generic中包含了一些基于泛型的集合类,使用泛型集合类可以提供更高的类型安全性,还有更高的性能,避免了非泛型集合的重复的装箱、拆箱。

 

哈希表

posted @ 2012-11-22 15:08  super 86  阅读(346)  评论(0编辑  收藏  举报