Example #1
0
        void IDictionary.Add(object key, object value)
        {
            ReversibleSortedList <TKey, TValue> .VerifyKey(key);

            ReversibleSortedList <TKey, TValue> .VerifyValueType(value);

            this.Add((TKey)key, (TValue)value);
        }
Example #2
0
        object IDictionary.this[object key]
        {
            get
            {
                if (ReversibleSortedList <TKey, TValue> .IsCompatibleKey(key))
                {
                    int num1 = this.IndexOfKey((TKey)key);
                    if (num1 >= 0)
                    {
                        return(this.values[num1]);
                    }
                }
                return(null);
            }
            set
            {
                ReversibleSortedList <TKey, TValue> .VerifyKey(key);

                ReversibleSortedList <TKey, TValue> .VerifyValueType(value);

                this[(TKey)key] = (TValue)value;
            }
        }