System.Data.OleDb Namespace OleDbParameterCollection Class
Removes the OleDbParameter at the specified index from the collection.
[ VB ]
Overloads Overridable Public Sub RemoveAt ( _
ByVal index As Integer _
)
[ C# ]
public virtual void RemoveAt (
int index
);
[ C++ ]
public: virtual void RemoveAt (
int index
);
[ JScript ]
public function RemoveAt (
index : int
);
- index
- The zero-based index of the parameter to remove.
IList.RemoveAt
The following example first uses the Contains property to find an OleDbParameter at the specified index within the Parameters collection of a specifed OleDbCommand object. If the parameter exists, the example removes it.
public void SearchOleDbParams ( OleDbCommand myCmd ) {
OleDbParameterCollection myParams = myCmd.Parameters;
if ( myParams.Contains ( myParams [ 3 ] )
myCmd.Parameters.RemoveAt ( 3 );
}
Public Sub SearchOleDbParams ( ByVal myCmd As OleDbCommand )
Dim myParams As OleDbParameterCollection = myCmd.Parameters
If myParams.Contains ( myParams ( 3 ) ) Then
myCmd.Parameters.RemoveAt ( 3 );
End If
End Sub |
|
C# |
VB |
OleDbParameterCollection Members OleDbParameterCollection.RemoveAt Overload List