Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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), _
        UniqueConstraint)

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

.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