Name

DataRelationCollection

Synopsis

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  ...

Get ADO.NET in a Nutshell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.