asp.net.ph

DataColumnMappingCollection.RemoveAt Method ( Int32 )

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

ColumnMappings

index
The zero-based index of the DataColumnMapping to remove.

Implements

IList.RemoveAt

Exceptions


Exception Type Condition
IndexOutOfRangeException The specified index does not exist.

Example

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

}
  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