TryGetValue
This method returns the value corresponding to the supplied attribute, as an output parameter.
Declaration
// C# public override bool TryGetValue(string keyword, out object value);
Parameters
-
keywordThe attribute for which the value is being retrieved.
-
valueThe value of the supplied attribute.
Sets
valueto the default value if the attribute is not present in the connection string.
Return Value
Returns true if the value that corresponds to the attribute has been successfully retrieved; otherwise, returns false. If the attribute is not present in the connection string, returns false and sets the value to null.
Exceptions
ArgumentNullException - The specified attribute is null.
Remarks
If the function returns false, sets value to null.
If the attribute is not present in the connection string, sets value to the default value.