Share via


Remove Method

Removes the specified SqlCeParameter from the collection.

Namespace:  System.Data.SqlServerCe
Assembly:  System.Data.SqlServerCe (in System.Data.SqlServerCe.dll)

Syntax

'Declaration
Public Overrides Sub Remove ( _
    value As Object _
)
'Usage
Dim instance As SqlCeParameterCollection
Dim value As Object

instance.Remove(value)
public override void Remove(
    Object value
)
public:
virtual void Remove(
    Object^ value
) override
abstract Remove : 
        value:Object -> unit 
override Remove : 
        value:Object -> unit 
public override function Remove(
    value : Object
)

Parameters

Implements

IList. . :: . .Remove(Object)

Exceptions

Exception Condition
SystemException

The parameter does not exist.

InvalidCastException

The parameter is not a SqlCeParameter.

Examples

The following example searches for a SqlCeParameter object in a SqlCeParameterCollection collection. If the parameter exists, it is removed. This example assumes that a SqlCeCommand has already been created.

' ...
' create SqlCeCommand cmd and SqlCeParameter param
' ...
If cmd.Parameters.Contains(param) Then
    cmd.Parameters.Remove(param)
End If
// ...
// create SqlCeCommand cmd and SqlCeParameter param
// ...
if (cmd.Parameters.Contains(param))
    cmd.Parameters.Remove(param);

See Also

Reference

SqlCeParameterCollection Class

SqlCeParameterCollection Members

System.Data.SqlServerCe Namespace