SqlCeParameterCollection.RemoveAt Method (Int32)
Removes the SqlCeParameter at the specified index from the collection.
Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in System.Data.SqlServerCe.dll)
Syntax
'Declaration
Public Overrides Sub RemoveAt ( _
index As Integer _
)
'Usage
Dim instance As SqlCeParameterCollection
Dim index As Integer
instance.RemoveAt(index)
public override void RemoveAt(
int index
)
public:
virtual void RemoveAt(
int index
) override
abstract RemoveAt :
index:int -> unit
override RemoveAt :
index:int -> unit
public override function RemoveAt(
index : int
)
Parameters
- index
Type: System.Int32
The zero-based index of the parameter to remove.
Implements
Exceptions
Exception | Condition |
---|---|
IndexOutOfRangeException | The specified index does not exist. |
Examples
The following example removes the first SqlCeParameter within a SqlCeParameterCollection. If the parameter exists, it is removed. This example assumes that a SqlCeCommand has already been created.
' ...
' create SqlCeCommand cmd
' ...
If cmd.Parameters.Count > 0 Then
cmd.Parameters.RemoveAt(0)
End If
// ...
// create SqlCeCommand cmd
// ...
if (cmd.Parameters.Count > 0)
{
cmd.Parameters.RemoveAt(0);
}