XPathAtomicValue.EffectiveBooleanValue MethodXPathAtomicValue.EffectiveBooleanValue MethodXPathAtomicValue::EffectiveBooleanValue Method
Returns the effective boolean value of this item.
Return Value
Type: System.BooleanSystem.BooleanSystem::Boolean
The effective boolean value of this item.
Exceptions
| Exception | Condition |
| NotSupportedExceptionNotSupportedExceptionNotSupportedException | Thrown if the current item is not a valid argument to xs:boolean. |
Remarks
The effective boolean value of an item is computed as follows:
- If the item is of type
xs:booleanor derived fromxs:boolean, returns the ValueAsBooleanValueAsBooleanValueAsBoolean. - If the item is of type
xs:string,xs:anyURI,xs:untypedAtomic, or a type derived from one of these, returnsfalseFalsefalseif the value has zero length; otherwise it returnstrueTruetrue. - If the item is of any numeric type or derived from a numeric type, returns
falseFalsefalseif the operand value isNaNor is numerically equal to zero; otherwise it returnstrueTruetrue. - In all other cases, EffectiveBooleanValueEffectiveBooleanValueEffectiveBooleanValue raises an exception.
