Table Property
Collapse the table of content
Expand the table of content

UniqueConstraint.Table Property


Gets the table to which this constraint belongs.

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

public override DataTable Table { get; }

Property Value

Type: System.Data.DataTable

The DataTable to which the constraint belongs.

The following example returns a UniqueConstraint object's DataTable.

Private Sub GetTableFromConstraint()
    Dim dataTable As DataTable
    Dim uniqueConstraint As UniqueConstraint

    ' Get a UniqueConstraint.
    uniqueConstraint = _
        CType(DataSet1.Tables("Suppliers").Constraints(0), _

    ' Get the DataTable.
    dataTable = uniqueConstraint.Table
End Sub

.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft