void IDictionary.Remove(object key)
 {
     if (SortedList <TKey, TValue> .IsCompatibleKey(key))
     {
         this.Remove((TKey)key);
     }
 }
 object IDictionary.this[object key]
 {
     get
     {
         if (SortedList <TKey, TValue> .IsCompatibleKey(key))
         {
             int index = this.IndexOfKey((TKey)key);
             if (index >= 0)
             {
                 return(this.values[index]);
             }
         }
         return(null);
     }
     set
     {
         if (!SortedList <TKey, TValue> .IsCompatibleKey(key))
         {
             System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key);
         }
         System.ThrowHelper.IfNullAndNullsAreIllegalThenThrow <TValue>(value, System.ExceptionArgument.value);
         try
         {
             TKey local = (TKey)key;
             try
             {
                 this[local] = (TValue)value;
             }
             catch (InvalidCastException)
             {
                 System.ThrowHelper.ThrowWrongValueTypeArgumentException(value, typeof(TValue));
             }
         }
         catch (InvalidCastException)
         {
             System.ThrowHelper.ThrowWrongKeyTypeArgumentException(key, typeof(TKey));
         }
     }
 }
 bool IDictionary.Contains(object key)
 {
     return(SortedList <TKey, TValue> .IsCompatibleKey(key) && this.ContainsKey((TKey)key));
 }