ValidationHelper GetNullableBoolean Method Kentico 8.1 API Reference
Returns the boolean representation of an object or default value if a conversion doesn't exist.

Namespace: CMS.Helpers
Assembly: CMS.Helpers (in CMS.Helpers.dll) Version: 8.0.0.0 (8.1.5347.20411)

Parameters

value
Type: OnlineSystem Object
The value to convert
defaultValue
Type: OnlineSystem Nullable OnlineBoolean 
The default value to substitute

Return Value

Type: OnlineNullable OnlineBoolean 
Succesfull 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