Пример #1
0
 private static void VerifyValueType(object value)
 {
     if (!ReadOnlyCollection <T> .IsCompatibleObject(value))
     {
         ThrowHelper.ThrowWrongValueTypeArgumentException(value, typeof(T));
     }
 }
Пример #2
0
 int IList.IndexOf(object value)
 {
     if (ReadOnlyCollection <T> .IsCompatibleObject(value))
     {
         return(this.IndexOf((T)value));
     }
     return(-1);
 }
Пример #3
0
 bool IList.Contains(object value)
 {
     if (ReadOnlyCollection <T> .IsCompatibleObject(value))
     {
         return(this.Contains((T)value));
     }
     return(false);
 }