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.
Applies to
See also
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈