asp.net.ph

DataColumnMappingCollection Constructor

System.Data.Common Namespace   DataColumnMappingCollection Class


Initializes an empty DataColumnMappingCollection.

[ VB ]
Public Sub New ( )

[ C# ]
public DataColumnMappingCollection ( );

[ C++ ]
public: DataColumnMappingCollection ( );

[ JScript ]
public function DataColumnMappingCollection ( );

Remarks

The default constructor initializes all fields to their default values.

Example

The following example initializes a DataColumnMappingCollection, adds DataColumnMapping objects to the collection, and displays a list of the mapped source columns.

void CreateColumnMappings ( ) {
   DataColumnMappingCollection myFieldsMaps = new DataColumnMappingCollection ( );
   myFieldsMaps.Add ( "Category Name", "DataCategory" );
   myFieldsMaps.Add ( "Description", "DataDescription" );
   myFieldsMaps.Add ( "Picture", "DataPicture" );
   string myMessage = "Column Mappings:\n";

   for ( int i=0; i < myFieldsMaps.Count; i++ ) {
      myMessage += i.ToString ( ) + " " + myFieldsMaps [ ].ToString ( ) + "\n";
   }
   Response.Write ( myMessage );
}
  C# VB

See Also

DataColumnMappingCollection Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph