asp.net.ph

DataColumnMappingCollection.RemoveAt Method ( String )

System.Data.Common Namespace   DataColumnMappingCollection Class


Removes the DataColumnMapping with the given SourceColumn name from the collection.

[ VB ]
NotOverridable Overloads Public Sub RemoveAt ( _
   ByVal sourceColumn As String _
) Implements IColumnMappingCollection.RemoveAt

[ C# ]
public void RemoveAt (
   string sourceColumn
);

[ C++ ]
public: __sealed void RemoveAt (
   String* sourceColumn
);

[ JScript ]
public function RemoveAt (
   sourceColumn : String
);

Parameters

sourceColumn
The case-sensitive name of a SourceColumn to find.

Implements

IColumnMappingCollection.RemoveAt

Exceptions


Exception Type Condition
ArgumentException The specified source column does not exist.

Example

The following example first uses the Contains method to find a DataColumnMapping with the specified source column name within the ColumnMappings collection of a specifed DataTableMapping object. If the mapping exists, the example removes it.

public void SearchColumnMappings ( DataTableMapping myTableMap ) {
   DataColumnMappingCollection myFieldsMaps = myTableMap.ColumnMappings;
   if ( myFieldsMaps.Contains ( "Picture" )
      myFieldsMaps.RemoveAt ( "Picture" );

}
  C# VB

See Also

DataColumnMappingCollection Members   DataColumnMappingCollection.RemoveAt Overload List 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