UniqueConstraint.Table 属性

定义

获取此约束所属的表。

public:
 virtual property System::Data::DataTable ^ Table { System::Data::DataTable ^ get(); };
public override System.Data.DataTable? Table { get; }
public override System.Data.DataTable Table { get; }
[System.Data.DataSysDescription("ConstraintTableDescr")]
public override System.Data.DataTable Table { get; }
member this.Table : System.Data.DataTable
[<System.Data.DataSysDescription("ConstraintTableDescr")>]
member this.Table : System.Data.DataTable
Public Overrides ReadOnly Property Table As DataTable

属性值

此约束所属的 DataTable

属性

示例

以下示例返回 UniqueConstraint 对象的 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

适用于

另请参阅