Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
AddRange Method

ConstraintCollection::AddRange Method

Copies the elements of the specified ConstraintCollection array to the end of the collection.

Namespace:  System.Data
Assembly:  System.Data (in System.Data.dll)

public:
void AddRange(
	array<Constraint^>^ constraints
)

Parameters

constraints
Type: array<System.Data::Constraint>

An array of ConstraintCollection objects to add to the collection.

If BeginInit has been called, AddRange does not add any objects to the collection until EndInit is called. At the time that EndInit is called, the collection will be populated with the items specified in the most recent call to AddRange. If AddRange is called multiple times within a BeginInit / EndInit sequence, only those items specified in the most recent call to AddRange are added.

The following example creates primary and foreign key constraints, and adds them to the ConstraintCollection.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

XNA Framework

Supported in: 3.0, 2.0, 1.0
Show:
© 2015 Microsoft