ForeignKeyConstraint.Columns ForeignKeyConstraint.Columns ForeignKeyConstraint.Columns ForeignKeyConstraint.Columns Property

Definizione

Ottiene le colonne figlio di questo vincolo.Gets the child columns of this constraint.

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

Valore della proprietà

Matrice di oggetti DataColumn che rappresentano le colonne figlio del vincolo.An array of DataColumn objects that are the child columns of the constraint.

Esempi

Nell'esempio seguente viene restituita una DataColumn matrice di oggetti Columns tramite la proprietà.The following example returns an array of DataColumn objects through the Columns property.

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

Si applica a

Vedi anche