StringExtensions.AsBool StringExtensions.AsBool StringExtensions.AsBool Method

Definition

Overloads

AsBool(String) AsBool(String) AsBool(String)

Converts a string to a Boolean (true/false) value.

AsBool(String, Boolean) AsBool(String, Boolean) AsBool(String, Boolean)

Converts a string to a Boolean (true/false) value and specifies a default value.

AsBool(String) AsBool(String) AsBool(String)

Converts a string to a Boolean (true/false) value.

public static bool AsBool (this string value);
static member AsBool : string -> bool
<Extension()>
Public Function AsBool (value As String) As Boolean
Parameters
value
String String String

The value to convert.

Returns

The converted value.

AsBool(String, Boolean) AsBool(String, Boolean) 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 String String

The value to convert.

defaultValue
Boolean Boolean Boolean

The value to return if value is null or is an invalid value.

Returns

The converted value.

Applies to