FieldsGetBoolValue Method |
Get the value for the specified field, converted to a bool.
The behaviour when the field is not found is dictated by the
FindBehaviour parameter.
Namespace:
NetQuarry.Data
Assembly:
EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax public bool GetBoolValue(
string key,
bool defaultValue,
FindBehaviour behaviour
)
Public Function GetBoolValue (
key As String,
defaultValue As Boolean,
behaviour As FindBehaviour
) As Boolean
Parameters
- key
- Type: SystemString
The key of the field for which to get the value. - defaultValue
- Type: SystemBoolean
The value to return when the field is not found. - behaviour
- Type: NetQuarry.DataFindBehaviour
Specifies the behaviour when the field is not found.
Return Value
Type:
BooleanThe field's value (converted to a bool) if found, else the provided defaultValue.
Remarks
Null values (and DBNull) values are considered false. For numeric values, zero is
considered false and all other values true. For string values, empty strings, "0",
and "false" are considered false and all other values true.
See Also