共用方式為


DataRelation.DataSet 屬性

定義

取得 DataSet 所屬的 DataRelation

public:
 virtual property System::Data::DataSet ^ DataSet { System::Data::DataSet ^ get(); };
[System.ComponentModel.Browsable(false)]
public virtual System.Data.DataSet? DataSet { get; }
[System.ComponentModel.Browsable(false)]
public virtual System.Data.DataSet DataSet { get; }
[<System.ComponentModel.Browsable(false)>]
member this.DataSet : System.Data.DataSet
Public Overridable ReadOnly Property DataSet As DataSet

屬性值

DataSet 所屬的 DataRelation

屬性

範例

下列範例會取得 DataSetDataRelation

Private Sub GetRelDataSet(relation As DataRelation)
    ' Get the DataSet of the passed in DataRelation.
    Dim dataSet As DataSet = relation.DataSet

    ' Print the table names of each table in the DataSet.
    Dim table As DataTable
    For Each table In dataSet.Tables
        Console.WriteLine(table.TableName.ToString())
    Next
End Sub

備註

與相關聯的 DataSetDataRelationCollection透過 Relations 對象的屬性來DataSet存取。

適用於

另請參閱