StringExtensions.AsBool 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.
Overloads
AsBool(String) |
Converts a string to a Boolean (true/false) value. |
AsBool(String, Boolean) |
Converts a string to a Boolean (true/false) value and specifies a default value. |
AsBool(String)
AsBool(String, Boolean)
Converts a string to a Boolean (true/false) value and specifies a default value.
public static bool AsBool (this string value, bool defaultValue);
static member AsBool : string * bool -> bool
<Extension()>
Public Function AsBool (value As String, defaultValue As Boolean) As Boolean
Parameters
- value
- String
The value to convert.
- defaultValue
- Boolean
The value to return if value
is null or is an invalid value.
Returns
The converted value.