Removes the DB2Parameter at the specified index from the collection.
[Visual Basic]
NotOverridable Overloads Public Sub RemoveAt( _
ByVal index As Integer _
)
[C#]
public void RemoveAt(
int index
);
[C++]
public: __sealed void RemoveAt(
int index
);
[JScript]
public function RemoveAt(
index : int
);
| Exception type | Condition |
|---|---|
| IndexOutOfRangeException | A parameter with the specified name does not exist in the collection. |
[Visual Basic, C#] The following example searches for a DB2Parameter at the specified index within a DB2ParameterCollection . If the parameter exists, it is removed. This example assumes that a DB2ParameterCollection has already been created.
[Visual Basic]
Public
Sub SearchDB2Params() '
... '
create DB2ParameterCollection myParameters and DB2Parameter myNewParam "Param7"
' ...
If myParameters.Contains(Param7) Then
myParameters.RemoveAt(7)
End If
End Sub 'SearchDB2Params
[C#]
public
void SearchDB2Params() { //
... //
create DB2ParameterCollection myParameters and DB2Parameter myNewParam "Param7"
// ...
if (myParameters.Contains(Param7))
myParameters.RemoveAt(7);
}