แก้ไข

แชร์ผ่าน


IColumnMappingCollection.RemoveAt(String) Method

Definition

Removes the IColumnMapping object with the specified SourceColumn name from the collection.

public:
 void RemoveAt(System::String ^ sourceColumnName);
public void RemoveAt (string sourceColumnName);
abstract member RemoveAt : string -> unit
Public Sub RemoveAt (sourceColumnName As String)

Parameters

sourceColumnName
String

The case-sensitive SourceColumn name.

Exceptions

A DataColumnMapping object does not exist with the specified SourceColumn name.

Examples

The following example searches for an instance of the derived class, DataColumnMapping, with the given SourceColumn 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

Applies to