Windows apps
Collapse the table of content
Expand the table of content
Information
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^)

 

Removes the specified SqlParameter from the collection.

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

public:
void Remove(
	SqlParameter^ value
)

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.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft