OleDbConnectionStringBuilder.ContainsKey(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines whether the OleDbConnectionStringBuilder contains a specific key.
public:
override bool ContainsKey(System::String ^ keyword);
public override bool ContainsKey (string keyword);
override this.ContainsKey : string -> bool
Public Overrides Function ContainsKey (keyword As String) As Boolean
Parameters
- keyword
- String
The key to locate in the OleDbConnectionStringBuilder.
Returns
true
if the OleDbConnectionStringBuilder contains an element that has the specified key; otherwise, false
.
Exceptions
keyword
is null (Nothing
in Visual Basic).
Examples
The following example creates an OleDbConnectionStringBuilder instance, sets some of its properties, and then tries to determine whether various keys exist within the object by calling the ContainsKey method.
Remarks
Although setting the Provider property may implicitly fill in appropriate key/value pairs for the provider, the ContainsKey method does not return true
for implicitly provided keys. This method returns true
only for explicitly provided keys.