Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Removes the SqlCeParameter with the specified name from the collection.
Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in System.Data.SqlServerCe.dll)
Syntax
'Declaration
Public Overrides Sub RemoveAt ( _
parameterName As String _
)
'Usage
Dim instance As SqlCeParameterCollection
Dim parameterName As String
instance.RemoveAt(parameterName)
public override void RemoveAt(
string parameterName
)
public:
virtual void RemoveAt(
String^ parameterName
) override
abstract RemoveAt :
parameterName:string -> unit
override RemoveAt :
parameterName:string -> unit
public override function RemoveAt(
parameterName : String
)
Parameters
- parameterName
Type: System.String
The name of the parameter to remove.
Implements
IDataParameterCollection.RemoveAt(String)
Exceptions
Exception | Condition |
---|---|
ArgumentException | A parameter with the specified name does not exist in the collection. |
Examples
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") Then
cmd.Parameters.RemoveAt("@Description")
End If
// ...
// create SqlCeCommand cmd
// ...
if (cmd.Parameters.Contains("@Description"))
cmd.Parameters.RemoveAt("@Description");