ConstraintCollection serializable

ConstraintCollection serializable

System.Data (system.data.dll) class

This collection stores the constraints for a table, which it exposes through the DataTable.Constraints property. It can contain any class that derives from Constraint , including ForeignKeyConstraint and UniqueConstraint objects. You can retrieve an individual constraint by index or name .

 public class  ConstraintCollection  : InternalDataCollectionBase {  // Public Instance Properties  public virtual Constraint  this[string    name    ]  {get; }     public virtual Constraint  this[int    index    ]  {get; }  // Protected Instance Properties  protected override ArrayList  List  {get; }  // overrides InternalDataCollectionBase   // Public Instance Methods  public virtual Constraint  Add  (string   name   , DataColumn[ ]   columns   , bool   primaryKey   );    public virtual Constraint  Add  (string   name   , DataColumn[ ]   primaryKeyColumns   , DataColumn[ ]   foreignKeyColumns   );    public virtual Constraint  Add  (string   name   , DataColumn   column   , bool   primaryKey   );    public virtual Constraint  Add  (string   name   , DataColumn   primaryKeyColumn   , DataColumn   foreignKeyColumn   );    public void  Add  ( Constraint   constraint   );      public void  AddRange  ( Constraint[ ]   constraints   );      public bool  CanRemove  ( Constraint   constraint   );      public void  Clear  (  );      public bool  Contains  ( string   name   );      public int  IndexOf  ( Constraint   constraint   );      public virtual int  IndexOf  ( string   constraintName   );      public void  Remove  ( Constraint   constraint   );      public void  Remove  ( string   name   );      public void  RemoveAt  ( int   index   );  // Protected Instance Methods  protected virtual void  OnCollectionChanged  (System.ComponentModel.CollectionChangeEventArgs   ccevent   );  // Events  public event CollectionChangeEventHandler  CollectionChanged  ;   } 

Hierarchy

System.Object figs/u2192.gif InternalDataCollectionBase(System.Collections.ICollection, System.Collections.IEnumerable) figs/u2192.gif ConstraintCollection

Returned By

DataTable.Constraints



ADO. NET in a Nutshell
ADO.NET in a Nutshell
ISBN: 0596003617
EAN: 2147483647
Year: 2005
Pages: 415

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net