This class contains a collection of DataColumnMapping objects and is typically used for the DataTableMapping.ColumnMappings property. You can look up an individual DataColumnMapping by index or data source column name using the indexer. You can also use the GetByDataSetColumn( ) to retrieve a DataColumnMapping using the System.Data.DataSet name.

public sealed class DataColumnMappingCollection : MarshalByRefObject, System.Data.IColumnMappingCollection, IList,

        ICollection, IEnumerable {

// Public Constructors

   public DataColumnMappingCollection( );  

// Public Instance Properties

   public int Count{get; }                          // implements ICollection

   public DataColumnMapping this[string 


                  ]{set; get; }

   public DataColumnMapping this[int 


                  ]{set; get; } 

// Public Static Methods

   public static DataColumnMapping GetColumnMappingBySchemaAction(

        DataColumnMappingCollection columnMappings, string sourceColumn, 

        System.Data.MissingMappingAction mappingAction);

// Public Instance Methods

   public DataColumnMapping Add(string sourceColumn, string dataSetColumn);

   public int Add(object value);               // implements IList

   public void AddRange(DataColumnMapping[  ] values);  

   public void Clear( );                           // implements IList

   public bool Contains(object value);         // implements IList

   public bool Contains(string value);         // implements System.Data.IColumnMappingCollection

   public void CopyTo(Array array, int index);      // implements ICollection

   public DataColumnMapping GetByDataSetColumn(string value ...

Get ADO.NET in a Nutshell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.