Click or drag to resize
ValidationHelperGetNullableBoolean Method
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: 11.0.0
Syntax
C#
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: NullableBoolean
Successful 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