GetBoolFromString Method
- Last UpdatedNov 06, 2025
- 1 minute read
Convert and return the specified string as a bool Check for all possible text representations of true or false, otherwise default to the specified value. Uses system string for true / false to allow for different languages
'Declaration
Public Shared Function GetBoolFromString( _
ByVal inputString As String, _
ByVal defaultValue As Boolean _
) As Boolean
public static bool GetBoolFromString(
string inputString,
bool defaultValue
)
Parameters
- inputString
- The input string to convert to a bool
- defaultValue
- The value to return in case a conversion was not successful