Gets the value associated with the specified key or a default value if the key is not found or if the value found for that key cannot be parsed into the specified type.
Syntax
Visual Basic (Declaration) | |
---|
Public Function GetParsedValueOrDefault(Of T As {New, Struct})( _
ByVal key As String, _
ByVal defaultValue As T _
) As T |
Parameters
- key
- The key of the value to be parsed.
- defaultValue
- A default value to be returned if the key cannot be found or the value associated with the key cannot be parsed into the specified type.
Type Parameters
- T
- The type of the default value and which to parse the string value into.
Return Value
When the method is successful, the returned value is the value associated with the specified key. When the method fails, it returns defaultValue.
Exceptions
Requirements
Target Platforms: Windows 11 Professional or Enterprise; Windows 10 Professional, Enterprise, or Education (64-bit)
See Also