XPathAtomicValue.EffectiveNumericValue MethodXPathAtomicValue.EffectiveNumericValue MethodXPathAtomicValue::EffectiveNumericValue Method

Returns the effective numeric value of this item.

Syntax

Public Overridable Function EffectiveNumericValue() As Double
public virtual double EffectiveNumericValue()
public:
virtual double EffectiveNumericValue()
 

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:

  1. If the item is of type xs:double or derived from xs:double, returns the ValueAsDoubleValueAsDoubleValueAsDouble.
  2. If the item is of type xs:float or derived from xs:float, returns the ValueAsSingleValueAsSingleValueAsSingle cast to type doubleDoubledouble.
  3. If the item is of type xs:decimal or derived from xs:decimal, returns the ValueAsDecimalValueAsDecimalValueAsDecimal cast to type doubleDoubledouble.
  4. If the item is of type xs:boolean or derived from xs:boolean, returns 1.0E0 if ValueAsBooleanValueAsBooleanValueAsBoolean is trueTruetrue, or 0.0E0 if ValueAsBooleanValueAsBooleanValueAsBoolean is falseFalsefalse.
  5. If the item is of type xs:string or xs: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 of xs:double.
  6. In all other cases, NaNNaNNaN is returned.