EntityConnectionStringBuilder.TryGetValue(String, Object) Method
In this article
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.
Retrieves a value corresponding to the supplied key from this EntityConnectionStringBuilder.
public:
override bool TryGetValue(System::String ^ keyword, [Runtime::InteropServices::Out] System::Object ^ % value);
public override bool TryGetValue(string keyword, out object value);
override this.TryGetValue : string * obj -> bool
Public Overrides Function TryGetValue (keyword As String, ByRef value As Object) As Boolean
- keyword
- String
The key of the item to retrieve.
- value
- Object
The value corresponding to keyword
.
true
if keyword
was found in the connection string; otherwise, false
.
keyword
contains a null value (Nothing
in Visual Basic).
The TryGetValue method lets developers safely retrieve a value from a EntityConnectionStringBuilder without having to verify that the supplied key name is a valid key name. TryGetValue
does not raise an exception when it is passed a nonexistent key. Calling TryGetValue
with a nonexistent key puts the value null (Nothing
in Visual Basic) in the value
parameter.
Applies to
Product | Versions |
---|---|
.NET Framework | 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: