System.Data.DataRelationCollection.Remove C# (CSharp) Method

Remove() public method

Removes the given relation from the collection. An ArgumentNullException is thrown if this relation is null. An ArgumentException is thrown if this relation doesn't belong to this collection. The CollectionChanged event is fired if it succeeds.
public Remove ( DataRelation relation ) : void
relation DataRelation
return void
        public void Remove(DataRelation relation)
        {
            DataCommonEventSource.Log.Trace("<ds.DataRelationCollection.Remove|API> {0}, relation={1}", ObjectID, (relation != null) ? relation.ObjectID : 0);
            if (_inTransition == relation)
            {
                return;
            }

            _inTransition = relation;
            try
            {
                OnCollectionChanging(new CollectionChangeEventArgs(CollectionChangeAction.Remove, relation));
                RemoveCore(relation);
                OnCollectionChanged(new CollectionChangeEventArgs(CollectionChangeAction.Remove, relation));
            }
            finally
            {
                _inTransition = null;
            }
        }

Same methods

DataRelationCollection::Remove ( string name ) : void