StrToNullBool string

.StrToNullBool()

Takes a string containing a bool and converts it to a bool? type.

Method

public static bool? StrToNullBool(this string value)
string value

The string to convert to a bool?.

Example

C#
bool? x = "true".StrToNullBool();
C#
bool? x = "".StrToNullBool();