共用方式為


DataColumnMappingCollection.GetDataColumn 方法

定義

靜態 (Static) 方法,傳回 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 結構描述 (Schema) 與傳入的資料不相符時要採取的動作。

傳回

DataColumn 物件。

適用於

另請參閱