DataColumnMappingCollection DataColumnMappingCollection DataColumnMappingCollection Constructor

정의

DataColumnMappingCollection를 만듭니다.Creates an empty DataColumnMappingCollection.

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

예제

다음 예제에서는 한 DataColumnMappingCollection 컬렉션에 추가 DataColumnMapping 컬렉션에 개체 및 매핑된 원본 열의 목록을 표시 합니다.The following example creates a DataColumnMappingCollection collection, adds DataColumnMapping objects to the collection, and displays a list of the mapped source columns.

public void CreateColumnMappings() 
{
    DataColumnMappingCollection mappings =
        new DataColumnMappingCollection();
    mappings.Add("Category Name","DataCategory");
    mappings.Add("Description","DataDescription");
    mappings.Add("Picture","DataPicture");
    string myMessage = "ColumnMappings:\n";
    for(int i=0;i < mappings.Count;i++)
    {
        myMessage += i.ToString() + " " 
            + mappings[i].ToString() + "\n";
    }
    Console.WriteLine(myMessage);
}
Public Sub CreateColumnMappings()
    Dim mappings As New DataColumnMappingCollection()
    mappings.Add("Category Name", "DataCategory")
    mappings.Add("Description", "DataDescription")
    mappings.Add("Picture", "DataPicture")
    Dim myMessage As String = "ColumnMappings:" + ControlChars.Cr
    Dim i As Integer
    For i = 0 To mappings.Count - 1
        myMessage += i.ToString() + " " + mappings(i).ToString() _
           + ControlChars.Cr
    Next i
    Console.WriteLine(myMessage)
End Sub

적용 대상

추가 정보