Пример #1
0
        public bool Remove(TKey key)
        {
            HashTableArrayNode <TKey, TValue> nodes = _array[GetIndex(key)];

            if (nodes != null)
            {
                return(nodes.Remove(key));
            }

            return(false);
        }
Пример #2
0
        public void Add(TKey key, TValue value)
        {
            int index = GetIndex(key);
            HashTableArrayNode <TKey, TValue> nodes = _array[index];

            if (nodes == null)
            {
                nodes         = new HashTableArrayNode <TKey, TValue>();
                _array[index] = nodes;
            }

            nodes.Add(key, value);
        }