SqlCeParameterCollection.Remove Method

Removes the specified SqlCeParameter from the collection.

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

public override void Remove(
	Object value
)

Parameters

value
Type: System.Object
The SqlCeParameter object to remove from the collection.

Implements

IList.Remove(Object)

ExceptionCondition
SystemException

The parameter does not exist.

InvalidCastException

The parameter is not a SqlCeParameter.

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))
    cmd.Parameters.Remove(param);


Show: