DbConnectionStringBuilder.Remove Method
Removes the entry with the specified key from the DbConnectionStringBuilder instance.
Namespace: System.Data.Common
Assembly: System.Data (in System.Data.dll)
Parameters
- keyword
- Type: System.String
The key of the key/value pair to be removed from the connection string in this DbConnectionStringBuilder.
Return Value
Type: System.Booleantrue if the key existed within the connection string and was removed; false if the key did not exist.
| Exception | Condition |
|---|---|
| ArgumentNullException | keyword is null (Nothing in Visual Basic) |
| NotSupportedException | The DbConnectionStringBuilder is read-only, or the DbConnectionStringBuilder has a fixed size. |
Because the Remove method returns a value that indicates its success, it is not required to look for the key before trying to remove the key/value pair from the DbConnectionStringBuilder instance.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.