DataTableMapping.ColumnMappings 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 DataColumnMappingCollection for the DataTable.
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
Samarbeta med oss på GitHub
Källan för det här innehållet finns på GitHub, där du även kan skapa och granska ärenden och pull-begäranden. Se vår deltagarguide för mer information.