Gets the boolean value of a string.
The boolean value of the string.
The boolean value is true, if the string is one of the following values (case-insensitive):
Otherwise the value is false.
The default value is returned if the string is blank or null.
bool b0 = MainUtil.BoolToString("true", false); // true
bool b1 = MainUtil.BoolToString("True", false); // true
bool b2 = MainUtil.BoolToString("yes", false); // true
bool b3 = MainUtil.BoolToString("1", false); // true
bool b4 = MainUtil.BoolToString("no", false); // false
bool b5 = MainUtil.BoolToString("false", false); // false
bool b6 = MainUtil.BoolToString("", false); // false
bool b6 = MainUtil.BoolToString("", true); // true
bool b6 = MainUtil.BoolToString(null, true); // true
MainUtil Class | Sitecore Namespace | MainUtil.GetBool Overload List