Editare

Partajați prin


DataTableMapping.ColumnMappings Property

Definition

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

Property Value

A data column mapping collection.

Attributes

Examples

The following example creates a DataTableMapping object, sets some of its properties, and copies its ColumnMappings to an array. This example assumes that a DataColumnMappingCollection has been created.

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

Applies to

See also