using System.Collections.Generic; namespace Base { public class QueueDictionary { private readonly List list = new List(); private readonly Dictionary dictionary = new Dictionary(); public void Add(T t, K k) { this.list.Add(t); this.dictionary.Add(t, k); } public bool Remove(T t) { this.list.Remove(t); this.dictionary.Remove(t); return true; } public int Count { get { return this.list.Count; } } public T FirstKey { get { return this.list[0]; } } public K this[T t] { get { return this.dictionary[t]; } } } }