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 );
IColumnMappingCollection.RemoveAt
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" ); }
Public Sub SearchColumnMappings ( ByVal myTableMap As DataTableMapping ) Dim myFieldsMaps As DataColumnMappingCollection = myTableMap.ColumnMappings If myFieldsMaps.Contains ( "Picture" ) Then myFieldsMaps.RemoveAt ( "Picture" ); End If End Sub
DataColumnMappingCollection Members DataColumnMappingCollection.RemoveAt Overload List
© 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