The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
SqlParameterCollection::Remove Method (SqlParameter^)
.NET Framework (current version)
Removes the specified SqlParameter from the collection.
Assembly: System.Data (in System.Data.dll)
Parameters
- value
-
Type:
System.Data.SqlClient::SqlParameter^
A SqlParameter object to remove from the collection.
| Exception | Condition |
|---|---|
| InvalidCastException | The parameter is not a SqlParameter. |
| SystemException | The parameter does not exist in the collection. |
The following example searches for a SqlParameter object in a SqlParameterCollection collection. If the parameter exists, the example removes it. This example assumes that a SqlParameterCollection collection has already been created by a SqlCommand.
.NET Framework
Available since 2.0
Available since 2.0
Show: