UniqueConstraint Constructor (String^, array<DataColumn^>^)

 

Initializes a new instance of the UniqueConstraint class with the specified name and array of DataColumn objects.

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

public:
UniqueConstraint(
	String^ name,
	array<DataColumn^>^ columns
)

Parameters

name
Type: System::String^

The name of the constraint.

columns
Type: array<System.Data::DataColumn^>^

The array of DataColumn objects to constrain.

The following example creates a DataTable with two columns, and adds a new UniqueConstraint to the ConstraintCollection.

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

.NET Framework
Available since 1.1
Return to top
Show: