认识SortedList类

可以参考:

http://www.cnblogs.com/wisdomforce/archive/2010/05/20/1740115.html

表示键/值对的集合,可按键各索引访问.

在System.Collections.命名空间中.

[SerializableAttribute]

[ComVisibleAttribute(true)]

public class SortList:IDictionary,ICollection,IEnumerable,ICloneable

SortList在内部维护两个数组以将数组存储到列表中.即,一个数组用于健,另一个数组用于相关联的值.每个元素都是一个可作为DictionaryEntry对象访问的键值.键不能为空.

SortList 容量可以自动增加,也可通过TrimToSize或者Capacity属性减少容量.

foreach(DictionaryEntity myDE in mySortList){......}

构造函数重载列表

SortList()

SortList(IComparer)

SortList(IDictionary)

SortList(Int32)

SortList(IComparer, Int32)

SortList(Idictionary, IComparer)

公共属性:

Capacity Count IsFixedSize IsReadOnly Item Keys Values

公共方法:

Add(Object key, Object value);

Clear();移除所有元素.

Contains() ContainsKey() ContainsValue()

GetKey() GetKeyList() GetType() GetValueList()

Remove() RemoveAt()

IndexOfKey() IndexOfValue()

原文地址:https://www.cnblogs.com/chenqingwei/p/1740570.html