DataColumnMappingCollection.GetDataColumn 方法

定义

一个静态方法,它返回未实例化的 DataColumn 对象的 DataColumnMappingCollection 对象。

public:
 static System::Data::DataColumn ^ GetDataColumn(System::Data::Common::DataColumnMappingCollection ^ columnMappings, System::String ^ sourceColumn, Type ^ dataType, System::Data::DataTable ^ dataTable, System::Data::MissingMappingAction mappingAction, System::Data::MissingSchemaAction schemaAction);
public static System.Data.DataColumn? GetDataColumn (System.Data.Common.DataColumnMappingCollection? columnMappings, string sourceColumn, Type? dataType, System.Data.DataTable dataTable, System.Data.MissingMappingAction mappingAction, System.Data.MissingSchemaAction schemaAction);
public static System.Data.DataColumn GetDataColumn (System.Data.Common.DataColumnMappingCollection columnMappings, string sourceColumn, Type dataType, System.Data.DataTable dataTable, System.Data.MissingMappingAction mappingAction, System.Data.MissingSchemaAction schemaAction);
static member GetDataColumn : System.Data.Common.DataColumnMappingCollection * string * Type * System.Data.DataTable * System.Data.MissingMappingAction * System.Data.MissingSchemaAction -> System.Data.DataColumn
Public Shared Function GetDataColumn (columnMappings As DataColumnMappingCollection, sourceColumn As String, dataType As Type, dataTable As DataTable, mappingAction As MissingMappingAction, schemaAction As MissingSchemaAction) As DataColumn

参数

sourceColumn
String

数据源中区分大小写的列名。

dataType
Type

正被映射的列的数据类型。

dataTable
DataTable

DataTable 的一个实例。

mappingAction
MissingMappingAction

MissingMappingAction 值之一。

schemaAction
MissingSchemaAction

确定现有 DataSet 架构与传入数据不匹配时需要执行的操作。

返回

DataColumn 对象。

适用于

另请参阅