public LruCache(int maxEntries) { if (maxEntries < 1) { throw new ArgumentException("maxEntries must be greater than zero."); } MaxEntries = maxEntries; cache = new Dictionary <TKey, LruListItem <TKey, TValue> >(); lruList = new LruList <TKey, TValue>(); }