ConfigurationSection.TryGetValue(String, 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.
Tries to get the value of this section as a string.
public:
bool TryGetValue(System::String ^ key, [Runtime::InteropServices::Out] System::String ^ % value);
public bool TryGetValue(string? key, out string? value);
member this.TryGetValue : string * string -> bool
Public Function TryGetValue (key As String, ByRef value As String) As Boolean
Parameters
- key
- String
The configuration key. If null, the value of the section itself is returned.
- value
- String
When this method returns, contains the value of the section if it exists; otherwise, null.
Returns
true if the value was found; otherwise, false.