CollectionRemoveInvalidObject() static private méthode

static private CollectionRemoveInvalidObject ( Type itemType, ICollection collection ) : ArgumentException
itemType System.Type
collection ICollection
Résultat System.ArgumentException
Exemple #1
0
        public void Remove(DataColumnMapping value)
        {
            if (value == null)
            {
                throw ADP.ColumnsAddNullAttempt("value");
            }
            int index = this.IndexOf(value);

            if (-1 == index)
            {
                throw ADP.CollectionRemoveInvalidObject(this.ItemType, this);
            }
            this.RemoveIndex(index);
        }
        /// <include file='doc\DataTableMappingCollection.uex' path='docs/doc[@for="DataTableMappingCollection.Remove"]/*' />
        public void Remove(object value)
        {
            ValidateType(value);
            int index = IndexOf((DataTableMapping)value);

            if (-1 != index)
            {
                RemoveIndex(index);
            }
            else
            {
                throw ADP.CollectionRemoveInvalidObject(ItemType, this);
            }
        }
Exemple #3
0
        public void Remove(DataColumnMapping value)
        {
            if (null == value)
            {
                throw ADP.ColumnsAddNullAttempt(nameof(value));
            }
            int index = IndexOf(value);

            if (-1 != index)
            {
                RemoveIndex(index);
            }
            else
            {
                throw ADP.CollectionRemoveInvalidObject(ItemType, this);
            }
        }