OracleConnectionStringBuilder.TryGetValue(String, Object) 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.
Retrieves a value corresponding to the supplied key from this OracleConnectionStringBuilder.
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
Parameters
- keyword
- String
The key of the item to retrieve.
- value
- Object
The value corresponding to keyword
.
Returns
true
if keyword
was found within the connection string; otherwise, false
.
Remarks
The TryGetValue method lets developers safely retrieve a value from an OracleConnectionStringBuilder without needing to verify that the supplied key name is a valid key name. Because TryGetValue gracefully handles searching for a non-existent key, there is no need to look for the existence of a key before retrieving its value. Calling TryGetValue with a nonexistent key will place the value null (Nothing
in Visual Basic) in the value
parameter.