SqlCeParameterCollection.RemoveAt Method (String)

Removes the SqlCeParameter with the specified name from the collection.

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

public override void RemoveAt(
	string parameterName
)

Parameters

parameterName
Type: System.String
The name of the parameter to remove.

Implements

IDataParameterCollection.RemoveAt(String)

ExceptionCondition
ArgumentException

A parameter with the specified name does not exist in the collection.

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

// ...
// create SqlCeCommand cmd
// ...
if (cmd.Parameters.Contains("@Description"))
    cmd.Parameters.RemoveAt("@Description");


Show: