public T this[string key] { get { return(_items[_keys.IndexOf(key)]); } set { _items[_keys.IndexOf(key)] = value; } }
public virtual void Remove(T item) { int index = _items.IndexOf(item); T removedItem = _items[index]; string removedKey = _keys[index]; _items.RemoveAt(index); _keys.RemoveAt(index); if (ItemRemove != null) { ItemRemove(this, new KeyedCollectionRemoveEventArgs(removedItem, removedKey, index)); } }