Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

DataColumnMappingCollection Class

Contains a collection of DataColumnMapping objects.

System.Object
  System.MarshalByRefObject
    System.Data.Common.DataColumnMappingCollection

Namespace:  System.Data.Common
Assembly:  System.Data (in System.Data.dll)
public sealed class DataColumnMappingCollection : MarshalByRefObject, 
	IColumnMappingCollection, IList, ICollection, IEnumerable

The DataColumnMappingCollection type exposes the following members.

  NameDescription
Public methodSupported by the XNA FrameworkDataColumnMappingCollectionCreates an empty DataColumnMappingCollection.
Top
  NameDescription
Public propertySupported by the XNA FrameworkCountGets the number of DataColumnMapping objects in the collection.
Public propertySupported by the XNA FrameworkItem[Int32]Gets or sets the DataColumnMapping object at the specified index.
Public propertySupported by the XNA FrameworkItem[String]Gets or sets the DataColumnMapping object with the specified source column name.
Top
  NameDescription
Public methodSupported by the XNA FrameworkAdd(Object)Adds a DataColumnMapping object to the collection.
Public methodSupported by the XNA FrameworkAdd(String, String)Adds a DataColumnMapping object to the collection when given a source column name and a DataSet column name.
Public methodSupported by the XNA FrameworkAddRange(Array)Copies the elements of the specified Array to the end of the collection.
Public methodSupported by the XNA FrameworkAddRange(DataColumnMapping[])Copies the elements of the specified DataColumnMapping array to the end of the collection.
Public methodSupported by the XNA FrameworkClearRemoves all DataColumnMapping objects from the collection.
Public methodSupported by the XNA FrameworkContains(Object)Gets a value indicating whether a DataColumnMapping object with the given Object exists in the collection.
Public methodSupported by the XNA FrameworkContains(String)Gets a value indicating whether a DataColumnMapping object with the given source column name exists in the collection.
Public methodSupported by the XNA FrameworkCopyTo(Array, Int32)Copies the elements of the DataColumnMappingCollection to the specified array.
Public methodSupported by the XNA FrameworkCopyTo(DataColumnMapping[], Int32)Copies the elements of the DataColumnMappingCollection to the specified DataColumnMapping array.
Public methodCreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public methodSupported by the XNA FrameworkEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodSupported by the XNA FrameworkGetByDataSetColumnGets the DataColumnMapping object with the specified DataSet column name.
Public methodStatic memberSupported by the XNA FrameworkGetColumnMappingBySchemaActionGets a DataColumnMapping for the specified DataColumnMappingCollection, source column name, and MissingMappingAction.
Public methodStatic memberSupported by the XNA FrameworkGetDataColumnA static method that returns a DataColumn object without instantiating a DataColumnMappingCollection object.
Public methodSupported by the XNA FrameworkGetEnumeratorGets an enumerator that can iterate through the collection.
Public methodSupported by the XNA FrameworkGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public methodSupported by the XNA FrameworkGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodSupported by the XNA FrameworkIndexOf(Object)Gets the location of the specified Object that is a DataColumnMapping within the collection.
Public methodSupported by the XNA FrameworkIndexOf(String)Gets the location of the DataColumnMapping with the specified source column name.
Public methodSupported by the XNA FrameworkIndexOfDataSetColumnGets the location of the specified DataColumnMapping with the given DataSet column name.
Public methodInitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public methodSupported by the XNA FrameworkInsert(Int32, DataColumnMapping)Inserts a DataColumnMapping object into the DataColumnMappingCollection at the specified index.
Public methodSupported by the XNA FrameworkInsert(Int32, Object)Inserts a DataColumnMapping object into the DataColumnMappingCollection at the specified index.
Public methodSupported by the XNA FrameworkRemove(DataColumnMapping)Removes the specified DataColumnMapping from the collection.
Public methodSupported by the XNA FrameworkRemove(Object)Removes the Object that is a DataColumnMapping from the collection.
Public methodSupported by the XNA FrameworkRemoveAt(Int32)Removes the DataColumnMapping object with the specified index from the collection.
Public methodSupported by the XNA FrameworkRemoveAt(String)Removes the DataColumnMapping object with the specified source column name from the collection.
Public methodSupported by the XNA FrameworkToStringReturns a string that represents the current object. (Inherited from Object.)
Top
  NameDescription
Public Extension MethodAsParallelEnables parallelization of a query. (Defined by ParallelEnumerable.)
Public Extension MethodAsQueryableConverts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension MethodSupported by the XNA FrameworkCast<TResult>Casts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension MethodSupported by the XNA FrameworkOfType<TResult>Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)
Top
  NameDescription
Explicit interface implemetationPrivate propertySupported by the XNA FrameworkICollection.IsSynchronizedGets a value that indicates whether access to the ICollection is synchronized (thread safe).
Explicit interface implemetationPrivate propertySupported by the XNA FrameworkICollection.SyncRootGets an object that can be used to synchronize access to the ICollection.
Explicit interface implemetationPrivate methodSupported by the XNA FrameworkIColumnMappingCollection.AddAdds a DataColumnMapping object to the DataColumnMappingCollection by using the source column and DataSet column names.
Explicit interface implemetationPrivate methodSupported by the XNA FrameworkIColumnMappingCollection.GetByDataSetColumnGets the DataColumnMapping object that has the specified DataSet column name.
Explicit interface implemetationPrivate propertySupported by the XNA FrameworkIColumnMappingCollection.ItemGets or sets the IColumnMapping object with the specified SourceColumn name.
Explicit interface implemetationPrivate propertySupported by the XNA FrameworkIList.IsFixedSizeGets a value that indicates whether the IList has a fixed size.
Explicit interface implemetationPrivate propertySupported by the XNA FrameworkIList.IsReadOnlyGets a value that indicates whether the IList is read-only.
Explicit interface implemetationPrivate propertySupported by the XNA FrameworkIList.ItemGets or sets the element at the specified index.
Top

The following example uses a DataTableMapping to Add several DataColumnMapping objects to its ColumnMappings collection, and then displays a list of those mapped source columns. This example assumes that a DataTableMapping has already been created.


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());
    }
}

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.