ITableMapping.ColumnMappings Eigenschap

Definitie

Haalt de afgeleide DataColumnMappingCollection voor de DataTable.

public:
 property System::Data::IColumnMappingCollection ^ ColumnMappings { System::Data::IColumnMappingCollection ^ get(); };
public System.Data.IColumnMappingCollection ColumnMappings { get; }
member this.ColumnMappings : System.Data.IColumnMappingCollection
Public ReadOnly Property ColumnMappings As IColumnMappingCollection

Waarde van eigenschap

Een verzameling gegevenskolomtoewijzingen.

Voorbeelden

In het volgende voorbeeld wordt een exemplaar van de afgeleide klasse gemaakt, DataTableMappingenkele eigenschappen ervan ingesteld en gekopieerd ColumnMappings naar een matrix. In dit voorbeeld wordt ervan uitgegaan dat er een DataColumnMappingCollection is gemaakt.

public void CreateDataTableMapping()
{
    // ...
    // create mappings
    // ...
    DataColumnMapping[] columns = {};
    // Copy mappings to array
    mappings.CopyTo(columns, 0);
    DataTableMapping mapping =
        new DataTableMapping("Categories", "DataCategories", columns);
}
Public Sub CreateDataTableMapping()
    ' ...
    ' create mappings
    ' ...
    Dim columns() As DataColumnMapping
    ' Copy mappings to array
    mappings.CopyTo(columns, 0)
    Dim mapping As New DataTableMapping _
       ("Categories", "DataCategories", columns)
End Sub

Van toepassing op