DataRelationCollection
This collection contains all DataRelation
objects
for a DataSet
. This collection is accessed
through the DataSet.Relations
property. You can
look up a DataRelation
object by index or by name.
public abstract class DataRelationCollection : InternalDataCollectionBase { // Protected Constructors protected DataRelationCollection( ); // Public Instance Properties public abstract DataRelation this[stringname
]{get; } public abstract DataRelation this[intindex
]{get; } // Public Instance Methods public virtual DataRelation Add(DataColumn[ ]parentColumns
, DataColumn[ ]childColumns
); public virtual DataRelation Add(DataColumnparentColumn
, DataColumnchildColumn
); public virtual DataRelation Add(stringname
, DataColumn[ ]parentColumns
, DataColumn[ ]childColumns
); public virtual DataRelation Add(stringname
, DataColumn[ ]parentColumns
, DataColumn[ ]childColumns
, boolcreateConstraints
); public virtual DataRelation Add(stringname
, DataColumnparentColumn
, DataColumnchildColumn
); public virtual DataRelation Add(stringname
, DataColumnparentColumn
, DataColumnchildColumn
, boolcreateConstraints
); public void Add(DataRelationrelation
); public virtual void AddRange(DataRelation[ ]relations
); public virtual bool CanRemove(DataRelationrelation
); public virtual void Clear( ); public virtual bool Contains(stringname
); public virtual int IndexOf(DataRelationrelation
); public virtual int IndexOf(stringrelationName
); public void Remove(DataRelationrelation
); public void Remove(stringname
); public void RemoveAt(intindex
); // Protected Instance Methods protected virtual void AddCore(DataRelationrelation
); protected abstract DataSet GetDataSet( ); protected virtual void OnCollectionChanged(System.ComponentModel.CollectionChangeEventArgsccevent
); protected internal virtual void OnCollectionChanging( System.ComponentModel.CollectionChangeEventArgsccevent
); protected virtual void RemoveCore(DataRelationrelation
); // Events public event CollectionChangeEventHandler CollectionChanged; }