Adds a relation to the collection.
Creates a relation given the parameters and adds it to the collection. An ArgumentException is thrown if this relation already belongs to this collection or belongs to another collection. A DuplicateNameException is thrown if this collection already has a relation with the same name (case insensitive). An InvalidConstraintException is thrown if the relation can't be created based on the parameters. The CollectionChanged event is fired if it succeeds.
[Visual Basic] Overloads Overridable Public Function Add(String, DataColumn, DataColumn) As DataRelation
[C#] public virtual DataRelation Add(String, DataColumn, DataColumn);
[C++] public: virtual DataRelation* Add(String*, DataColumn, DataColumn);
[JScript] public function Add(String, DataColumn, DataColumn) : DataRelation;
Creates a relation given the parameters and adds it to the collection. An ArgumentException is thrown if this relation already belongs to this collection or belongs to another collection. A DuplicateNameException is thrown if this collection already has a relation with the same name (case insensitive). An InvalidConstraintException is thrown if the relation can't be created based on the parameters. The CollectionChanged event is fired if it succeeds.
[Visual Basic] Overloads Overridable Public Function Add(String, DataColumn, DataColumn, Boolean) As DataRelation
[C#] public virtual DataRelation Add(String, DataColumn, DataColumn, bool);
[C++] public: virtual DataRelation* Add(String*, DataColumn, DataColumn, bool);
[JScript] public function Add(String, DataColumn, DataColumn, Boolean) : DataRelation;
Creates a relation given the parameters and adds it to the collection. The name is defaulted. An ArgumentException is thrown if this relation already belongs to this collection or belongs to another collection. An InvalidConstraintException is thrown if the relation can't be created based on the parameters. The CollectionChanged event is fired if it succeeds.
[Visual Basic] Overloads Overridable Public Function Add(DataColumn, DataColumn) As DataRelation
[C#] public virtual DataRelation Add(DataColumn, DataColumn);
[C++] public: virtual DataRelation* Add(DataColumn*, DataColumn*);
[JScript] public function Add(DataColumn, DataColumn) : DataRelation;
Creates a relation given the parameters and adds it to the collection. An ArgumentNullException is thrown if this relation is null. An ArgumentException is thrown if this relation already belongs to this collection, belongs to another collection, or if this collection already has a relation with the same name (case insensitive). An InvalidRelationException is thrown if the relation can't be created based on the parameters. The CollectionChanged event is fired if it succeeds.
[Visual Basic] Overloads Overridable Public Function Add(String, DataColumn(), DataColumn()) As DataRelation
[C#] public virtual DataRelation Add(String, DataColumn[], DataColumn[]);
[C++] public: virtual DataRelation* Add(String*, DataColumn[], DataColumn[]);
[JScript] public function Add(String, DataColumn[], DataColumn[]) : DataRelation;
Creates a relation given the parameters and adds it to the collection. An ArgumentNullException is thrown if this relation is null. An ArgumentException is thrown if this relation already belongs to this collection, belongs to another collection, or if this collection already has a relation with the same name (case insensitive). An InvalidRelationException is thrown if the relation can't be created based on the parameters. The CollectionChanged event is fired if it succeeds.
[Visual Basic] Overloads Overridable Public Function Add(String, DataColumn(), DataColumn(), Boolean) As DataRelation
[C#] public virtual DataRelation Add(String, DataColumn[], DataColumn[], bool);
[C++] public: virtual DataRelation* Add(String*, DataColumn[], DataColumn[], bool);
[JScript] public function Add(String, DataColumn[], DataColumn[], Boolean) : DataRelation;
Creates a relation given the parameters and adds it to the collection. The name is defaulted. An ArgumentException is thrown if this relation already belongs to this collection or belongs to another collection. An InvalidConstraintException is thrown if the relation can't be created based on the parameters. The CollectionChanged event is fired if it succeeds.
[Visual Basic] Overloads Overridable Public Function Add(DataColumn(), DataColumn()) As DataRelation
[C#] public virtual DataRelation Add(DataColumn[], DataColumn[]);
[C++] public: virtual DataRelation* Add(DataColumn*[], DataColumn*[]);
[JScript] public function Add(DataColumn[], DataColumn[]) : DataRelation;
Adds the relation to the collection. An ArgumentNullException is thrown if this relation is null. An ArgumentException is thrown if this relation already belongs to this collection or belongs to another collection A DuplicateNameException is thrown if this collection already has a relation with the same name (case insensitive). An InvalidConstraintException is thrown if the relation has entered an invalid state since it's been created. The CollectionChanged event is fired if it succeeds.
[Visual Basic] Overloads Public Sub Add(DataRelation)
[C#] public void Add(DataRelation);
[C++] public: void Add(DataRelation*);
[JScript] public function Add(DataRelation);
RelationsCollection Class | RelationsCollection Members | System.Data Namespace