DB2ParameterCollection.RemoveAt Method
Removes the specified DB2Parameter from the collection.
Overload list
| Name | Description |
|---|---|
| RemoveAt(Integer) Implements IList.RemoveAt | Removes the DB2®Parameter at the specified index from the collection. |
| RemoveAt(String) Implements IDataParameterCollection.RemoveAt | Removes the DB2Parameter with the specified name from the collection. |
Example
[Visual Basic, C#] The following example searches for a DB2Parameter with the specified DB2Parameter.ParameterName within a DB2ParameterCollection. If the parameter exists, it is removed. This example assumes that an DB2ParameterCollection has already been created.
Note: [Visual Basic, C#] This example shows how to use one of the overloaded versions of RemoveAt. For other examples that might be available,
see the individual overload topics.
[Visual Basic]
Public Sub SearchDB2Params()
' ...
' create DB2ParameterCollection myParameters and DB2Parameter myNewParam
' ...
If myParameters.Contains("Description") Then
myParameters.RemoveAt("Description")
End If
End Sub 'SearchDB2Params
[C#]
public void SearchDB2Params() {
// ...
// create DB2ParameterCollection myParameters and DB2Parameter myNewParam
// ...
if (myParameters.Contains("Description"))
myParameters.RemoveAt("Description");
}