public virtual void Add(string key, T item) { if (_keys.Contains(key)) { throw new Exception("Key already exist"); } _keys.Add(key); int index = _items.Add(item); if (ItemAdd != null) { ItemAdd(this, new KeyedCollectionAddEventArgs(_items[index], index, _keys[index])); } }
public virtual bool Contains(T item) { return(_items.Contains(item)); }