Bagikan melalui


ForeignKeyConstraint.Columns Properti

Definisi

Mendapatkan kolom anak dari batasan ini.

public:
 virtual property cli::array <System::Data::DataColumn ^> ^ Columns { cli::array <System::Data::DataColumn ^> ^ get(); };
public virtual System.Data.DataColumn[] Columns { get; }
[System.Data.DataSysDescription("ForeignKeyConstraintChildColumnsDescr")]
public virtual System.Data.DataColumn[] Columns { get; }
member this.Columns : System.Data.DataColumn[]
[<System.Data.DataSysDescription("ForeignKeyConstraintChildColumnsDescr")>]
member this.Columns : System.Data.DataColumn[]
Public Overridable ReadOnly Property Columns As DataColumn()

Nilai Properti

Array DataColumn objek yang merupakan kolom anak dari batasan.

Atribut

Contoh

Contoh berikut mengembalikan array DataColumn objek melalui Columns properti .

Private Sub GetColumns()
   Dim dataColumns() As DataColumn
   Dim relation As DataRelation
   Dim i As Integer 
   ' Get the DataRelation from a DataSet.
   For Each relation In DataSet1.Relations
      If relation.GetType.ToString = _
        "System.Data.ForeignKeyConstraint" Then
        dataColumns = relation.ParentColumns
           For i = 0 To dataColumns.GetUpperBound(0)
              Console.WriteLine(dataColumns(i).ColumnName)
           Next i
      End If
   Next
End Sub

Berlaku untuk

Lihat juga