DataColumnMappingCollection.RemoveAt メソッド
定義
指定した DataColumnMapping オブジェクトをコレクションから削除します。Removes the specified DataColumnMapping object from the collection.
オーバーロード
RemoveAt(Int32) |
指定したインデックス番号の DataColumnMapping オブジェクトをコレクションから削除します。Removes the DataColumnMapping object with the specified index from the collection. |
RemoveAt(String) |
指定したソース列名が含まれる DataColumnMapping オブジェクトをコレクションから削除します。Removes the DataColumnMapping object with the specified source column name from the collection. |
RemoveAt(Int32)
指定したインデックス番号の DataColumnMapping オブジェクトをコレクションから削除します。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)
パラメーター
- index
- Int32
削除のする DataColumnMapping オブジェクトの、0 から始まるインデックス番号。The zero-based index of the DataColumnMapping object to remove.
実装
例外
指定したインデックス番号の DataColumnMapping オブジェクトがありません。There is no DataColumnMapping object with the specified index.
例
次の例では、 DataColumnMapping コレクション内の指定されたインデックスを持つオブジェクトを検索し DataColumnMappingCollection ます。The following example searches for a DataColumnMapping object with the given index within a DataColumnMappingCollection collection. が DataColumnMapping 存在する場合、マッピングは削除されます。If the DataColumnMapping exists, the mapping is removed. この例では、 DataColumnMappingCollection コレクションが作成されていることを前提としています。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
こちらもご覧ください
適用対象
RemoveAt(String)
指定したソース列名が含まれる DataColumnMapping オブジェクトをコレクションから削除します。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)
パラメーター
- sourceColumn
- String
ソース列名。大文字と小文字が区別されます。The case-sensitive source column name.
実装
例外
指定したソース列名が含まれる DataColumnMapping オブジェクトがありません。There is no DataColumnMapping object with the specified source column name.
例
次の例では、 DataColumnMapping コレクション内の指定されたソース列名を持つオブジェクトを検索し DataColumnMappingCollection ます。The following example searches for a DataColumnMapping object with the given source column name within a DataColumnMappingCollection collection. が DataColumnMapping 存在する場合、マッピングは削除されます。If the DataColumnMapping exists, the mapping is removed. この例では、 DataColumnMappingCollection コレクションが作成されていることを前提としています。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