DataColumnMappingCollection クラス
アセンブリ: System.Data (system.data.dll 内)

Public NotInheritable Class DataColumnMappingCollection Inherits MarshalByRefObject Implements IColumnMappingCollection, IList, ICollection, IEnumerable
public sealed class DataColumnMappingCollection : MarshalByRefObject, IColumnMappingCollection, IList, ICollection, IEnumerable
public ref class DataColumnMappingCollection sealed : public MarshalByRefObject, IColumnMappingCollection, IList, ICollection, IEnumerable

DataTableMapping に対して Add を実行して、複数の DataColumnMapping オブジェクトをColumnMappings コレクションに追加し、このコレクションで割り当てられたソース列の一覧を表示する例を次に示します。この例は、DataTableMapping が既に作成されていることを前提にしています。
Public Sub ShowColumnMappings() ' ... ' create tableMapping ' ... tableMapping.ColumnMappings.Add( _ "Category Name", "DataCategory") tableMapping.ColumnMappings.Add( _ "Description", "DataDescription") tableMapping.ColumnMappings.Add( _ "Picture", "DataPicture") Console.WriteLine("Column Mappings:") Dim i As Integer For i = 0 To tableMapping.ColumnMappings.Count - 1 Console.WriteLine(" {0} {1}", i, _ tableMapping.ColumnMappings(i).ToString()) Next i End Sub
public void ShowColumnMappings() { // ... // create tableMapping // ... tableMapping.ColumnMappings.Add("Category Name","DataCategory"); tableMapping.ColumnMappings.Add("Description","DataDescription"); tableMapping.ColumnMappings.Add("Picture","DataPicture"); Console.WriteLine("Column Mappings"); for(int i=0;i < tableMapping.ColumnMappings.Count;i++) { Console.WriteLine(" {0} {1}", i, tableMapping.ColumnMappings[i].ToString()); } }

System.MarshalByRefObject
System.Data.Common.DataColumnMappingCollection


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- DataColumnMappingCollection クラスのページへのリンク