Breyta

Deila með


DataColumnMappingCollection.RemoveAt Method

Definition

Removes the specified DataColumnMapping object from the collection.

Overloads

RemoveAt(Int32)

Removes the DataColumnMapping object with the specified index from the collection.

RemoveAt(String)

Removes the DataColumnMapping object with the specified source column name from the collection.

RemoveAt(Int32)

Source:
DataColumnMappingCollection.cs
Source:
DataColumnMappingCollection.cs
Source:
DataColumnMappingCollection.cs

Removes the DataColumnMapping object with the specified index from the collection.

public:
 virtual void RemoveAt(int index);
public void RemoveAt (int index);
abstract member RemoveAt : int -> unit
override this.RemoveAt : int -> unit
Public Sub RemoveAt (index As Integer)

Parameters

index
Int32

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

Implements

Exceptions

There is no DataColumnMapping object with the specified index.

Examples

The following example searches for a DataColumnMapping object with the given index within a DataColumnMappingCollection collection. If the DataColumnMapping exists, the mapping is removed. This example assumes that a DataColumnMappingCollection collection has been created.


public void RemoveDataColumnMapping()
{
    // ...
    // create mappings
    // ...
    if (mappings.Contains(7))
        mappings.RemoveAt(7);
}
Public Sub RemoveDataColumnMapping()
    ' ...
    ' create mappings
    ' ...
    If mappings.Contains(7) Then
        mappings.RemoveAt(7)
    End If
End Sub

See also

Applies to

RemoveAt(String)

Source:
DataColumnMappingCollection.cs
Source:
DataColumnMappingCollection.cs
Source:
DataColumnMappingCollection.cs

Removes the DataColumnMapping object with the specified source column name from the collection.

public:
 virtual void RemoveAt(System::String ^ sourceColumn);
public void RemoveAt (string sourceColumn);
abstract member RemoveAt : string -> unit
override this.RemoveAt : string -> unit
Public Sub RemoveAt (sourceColumn As String)

Parameters

sourceColumn
String

The case-sensitive source column name.

Implements

Exceptions

There is no DataColumnMapping object with the specified source column name.

Examples

The following example searches for a DataColumnMapping object with the given source column name within a DataColumnMappingCollection collection. If the DataColumnMapping exists, the mapping is removed. This example assumes that a DataColumnMappingCollection collection has been created.


public void RemoveDataColumnMapping()
{
    // ...
    // create columnMappings
    // ...
    if (columnMappings.Contains("Picture"))
        columnMappings.RemoveAt("Picture");
}
Public Sub RemoveDataColumnMapping()
    ' ...
    ' create columnMappings
    ' ...
    If columnMappings.Contains("Picture") Then
        columnMappings.RemoveAt("Picture")
    End If
End Sub

See also

Applies to