ForeignKeyConstraint.Columns Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the child columns of this constraint.
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()
Property Value
An array of DataColumn objects that are the child columns of the constraint.
- Attributes
Examples
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
Applies to
See also
Tee yhteistyötä kanssamme GitHubissa
Tämän sisällön lähde on GitHubissa, jossa voit myös luoda ja tarkastella ongelmia ja pull-pyyntöjä. Katso lisätietoja osallistujan oppaasta.