Esempio n. 1
0
 public T this[string key]
 {
     get
     {
         return(_items[_keys.IndexOf(key)]);
     }
     set
     {
         _items[_keys.IndexOf(key)] = value;
     }
 }
Esempio n. 2
0
        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));
            }
        }