DataColumnMappingCollection.RemoveAt Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
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)
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
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기