Ejemplo n.º 1
0
        public bool FindWithKey(string _key, out DictionaryData _foundData)
        {
            bool _retVal = false;

            _foundData = null;

            foreach (DictionaryData _data in _dictionary)
            {
                if (_data.Key == _key)
                {
                    _foundData = _data;
                    _retVal    = true;
                }
            }

            return(_retVal);
        }
Ejemplo n.º 2
0
        public bool Remove(string _removeKey)
        {
            bool _retVal = false;

            DictionaryData _tempData = default;

            foreach (DictionaryData _data in _dictionary)
            {
                if (_data.Key == _removeKey)
                {
                    _tempData = _data;
                    _retVal   = true;
                }
            }

            if (_retVal == true)
            {
                _dictionary.Remove(_tempData);
                _count--;
            }

            return(_retVal);
        }