System.Data.Common Namespace DataColumnMappingCollection Class
Removes the DataColumnMapping at the specified index from the collection.
[ VB ] NotOverridable Overloads Public Sub RemoveAt ( _ ByVal index As Integer _ ) Implements IList.RemoveAt [ C# ] public void RemoveAt ( int index ); [ C++ ] public: __sealed void RemoveAt ( int index ); [ JScript ] public function RemoveAt ( index : int );
IList.RemoveAt
The following example first uses the Contains method to find a DataColumnMapping at the specified index 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 ( myFieldsMaps [ 3 ] ) myFieldsMaps.RemoveAt ( 3 ); }
Public Sub SearchColumnMappings ( ByVal myTableMap As DataTableMapping ) Dim myFieldsMaps As DataColumnMappingCollection = myTableMap.ColumnMappings If myFieldsMaps.Contains ( myFieldsMaps ( 3 ) ) Then myFieldsMaps.RemoveAt ( 3 ); 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