ValidationHelperGetNullableBoolean Method |
Returns the boolean representation of an object or default value if a conversion doesn't exist.
Namespace: CMS.HelpersAssembly: CMS.Helpers (in CMS.Helpers.dll) Version: 13.0.131
Syntax public static Nullable<bool> GetNullableBoolean(
Object value,
Nullable<bool> defaultValue
)
Parameters
- value
- Type: SystemObject
The value to convert - defaultValue
- Type: SystemNullableBoolean
The default value to substitute
Return Value
Type:
NullableBooleanSuccessful conversion of value to boolean or a default value.
Remarks
This method allows to use null as a default and return value, usable in cases
where unknown value (3-state logic) has to behave differently under certain conditions.
See Also