DekGenius.com
[ Team LiB ] Previous Section Next Section

DataRelationCollection serializable

System.Data (system.data.dll) abstract class

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[string name]{get; } 
   public abstract DataRelation this[int index]{get; } 
// Public Instance Methods
   public virtual DataRelation Add(DataColumn[ ] parentColumns, DataColumn[ ] childColumns);
   public virtual DataRelation Add(DataColumn parentColumn, DataColumn childColumn);
   public virtual DataRelation Add(string name, DataColumn[ ] parentColumns, DataColumn[ ] childColumns);
   public virtual DataRelation Add(string name, DataColumn[ ] parentColumns, 
      DataColumn[ ] childColumns, bool createConstraints);
   public virtual DataRelation Add(string name, DataColumn parentColumn, DataColumn childColumn);
   public virtual DataRelation Add(string name, DataColumn parentColumn, DataColumn childColumn, bool createConstraints);
   public void Add( DataRelation relation);  
   public virtual void AddRange( DataRelation[ ] relations);  
   public virtual bool CanRemove( DataRelation relation);  
   public virtual void Clear(  );  
   public virtual bool Contains( string name);  
   public virtual int IndexOf( DataRelation relation);  
   public virtual int IndexOf( string relationName);  
   public void Remove( DataRelation relation);  
   public void Remove( string name);  
   public void RemoveAt( int index);  
// Protected Instance Methods
   protected virtual void AddCore( DataRelation relation);  
   protected abstract DataSet GetDataSet(  );  
   protected virtual void OnCollectionChanged(System.ComponentModel.CollectionChangeEventArgs ccevent);
   protected internal virtual void OnCollectionChanging(
        System.ComponentModel.CollectionChangeEventArgs ccevent);  
   protected virtual void RemoveCore( DataRelation relation);  
// Events
   public event CollectionChangeEventHandler CollectionChanged;  
}

Hierarchy

System.Object figs/U2192.gif InternalDataCollectionBase(System.Collections.ICollection, System.Collections.IEnumerable) figs/U2192.gif DataRelationCollection

Returned By

DataSet.Relations , DataTable.{ChildRelations , ParentRelations}

    [ Team LiB ] Previous Section Next Section