using System; using System.Collections; namespace YTSoft.DBUtility { /// /// 按什么顺序加进去就按什么顺序输出Hashtable /// public class NoSortHashtable : Hashtable { private ArrayList list = new ArrayList(); /// /// 添加 /// /// 主键 /// 值 public override void Add(object key, object value) { base.Add(key, value); list.Add(key); } /// /// 清空 /// public override void Clear() { base.Clear(); list.Clear(); } /// /// 移除 /// /// 主键 public override void Remove(object key) { base.Remove(key); list.Remove(key); } /// /// 主键 /// public override ICollection Keys { get { return list; } } } }