DataTableMapping.ColumnMappings 属性

定义

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

属性值

一个数据列映射集合。

属性

示例

以下示例创建一个 DataTableMapping 对象,设置其一些属性,并将其复制到 ColumnMappings 数组。 此示例假定 DataColumnMappingCollection 已创建 。

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

适用于

另请参阅