UniqueConstraint Constructor (String, DataColumn[])


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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)

new : 
        name:string *
        columns:DataColumn[] -> UniqueConstraint


Type: System.String

The name of the constraint.

Type: 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