Bagikan melalui


DataTableMapping.ColumnMappings Properti

Definisi

public:
 property System::Data::Common::DataColumnMappingCollection ^ ColumnMappings { System::Data::Common::DataColumnMappingCollection ^ get(); };
public System.Data.Common.DataColumnMappingCollection ColumnMappings { get; }
[System.Data.DataSysDescription("DataTableMapping_ColumnMappings")]
public System.Data.Common.DataColumnMappingCollection ColumnMappings { get; }
member this.ColumnMappings : System.Data.Common.DataColumnMappingCollection
[<System.Data.DataSysDescription("DataTableMapping_ColumnMappings")>]
member this.ColumnMappings : System.Data.Common.DataColumnMappingCollection
Public ReadOnly Property ColumnMappings As DataColumnMappingCollection

Nilai Properti

Kumpulan pemetaan kolom data.

Atribut

Contoh

Contoh berikut membuat DataTableMapping objek, mengatur beberapa propertinya, dan menyalinnya ColumnMappings ke array. Contoh ini mengasumsikan bahwa telah DataColumnMappingCollection dibuat.

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

Berlaku untuk

Lihat juga