XPathAtomicValue.EffectiveNumericValue MethodXPathAtomicValue.EffectiveNumericValue MethodXPathAtomicValue::EffectiveNumericValue Method
Returns the effective numeric value of this item.
Return Value
Type: System.DoubleSystem.DoubleSystem::Double
The effective numeric value of this item.
Remarks
The effective boolean value of an item is computed as follows:
- If the item is of type
xs:double
or derived fromxs:double
, returns the ValueAsDoubleValueAsDoubleValueAsDouble. - If the item is of type
xs:float
or derived fromxs:float
, returns the ValueAsSingleValueAsSingleValueAsSingle cast to type doubleDoubledouble. - If the item is of type
xs:decimal
or derived fromxs:decimal
, returns the ValueAsDecimalValueAsDecimalValueAsDecimal cast to type doubleDoubledouble. - If the item is of type
xs:boolean
or derived fromxs:boolean
, returns1.0E0
if ValueAsBooleanValueAsBooleanValueAsBoolean istrue
True
true
, or0.0E0
if ValueAsBooleanValueAsBooleanValueAsBoolean isfalse
False
false
. - If the item is of type
xs:string
orxs:untypedAtomic
, or a type derived from one of these, returns the ValueAsStringValueAsStringValueAsString parsed as a doubleDoubledouble, or NaNNaNNaN if ValueAsStringValueAsStringValueAsString is not a valid lexical representation ofxs:double
. - In all other cases, NaNNaNNaN is returned.