DataColumnMapping 构造函数

定义

初始化 DataColumnMapping 类的新实例。

重载

DataColumnMapping()

初始化 DataColumnMapping 类的新实例。

DataColumnMapping(String, String)

使用指定的源列名称和要映射到的 DataColumnMapping 列名初始化 DataSet 类的新实例。

DataColumnMapping()

Source:
DataColumnMapping.cs
Source:
DataColumnMapping.cs
Source:
DataColumnMapping.cs

初始化 DataColumnMapping 类的新实例。

public:
 DataColumnMapping();
public DataColumnMapping ();
Public Sub New ()

示例

以下示例创建对象 DataColumnMapping 、设置其属性并克隆它。

public void CreateDataColumnMapping()
{
    DataColumnMapping mapping = new DataColumnMapping();
    mapping.SourceColumn = "Description";
    mapping.DataSetColumn = "DataDescription";
}
Public Sub CreateDataColumnMapping()
    Dim mapping As New DataColumnMapping()
    mapping.SourceColumn = "Description"
    mapping.DataSetColumn = "DataDescription"
End Sub

另请参阅

适用于

DataColumnMapping(String, String)

Source:
DataColumnMapping.cs
Source:
DataColumnMapping.cs
Source:
DataColumnMapping.cs

使用指定的源列名称和要映射到的 DataColumnMapping 列名初始化 DataSet 类的新实例。

public:
 DataColumnMapping(System::String ^ sourceColumn, System::String ^ dataSetColumn);
public DataColumnMapping (string? sourceColumn, string? dataSetColumn);
public DataColumnMapping (string sourceColumn, string dataSetColumn);
new System.Data.Common.DataColumnMapping : string * string -> System.Data.Common.DataColumnMapping
Public Sub New (sourceColumn As String, dataSetColumn As String)

参数

sourceColumn
String

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

dataSetColumn
String

DataSet 中要映射到的列名(该名称不区分大小写)。

示例

以下示例创建对象 DataColumnMapping 、设置其属性并克隆它。

public void CreateDataColumnMapping()
{
    DataColumnMapping mapping =
        new DataColumnMapping("Description","DataDescription");
}
Public Sub CreateDataColumnMapping()
    Dim mapping As New DataColumnMapping( _
       "Description", "DataDescription")
End Sub

另请参阅

适用于