ReadElementContentAsDouble()

XmlReader::ReadElementContentAsDouble() method

Reads the current element and returns the contents as a double-precision floating-point number.

virtual double System::Xml::XmlReader::ReadElementContentAsDouble()

Return Value

The element content as a double-precision floating-point number.

Exceptions

ExceptionDescription
InvalidOperationExceptionThe XmlReader is not positioned on an element.
XmlExceptionThe current element contains child elements. The element content cannot be converted to a double-precision floating-point number.
ArgumentNullExceptionThe method is called with nullptr arguments.

XmlReader::ReadElementContentAsDouble(String, String) method

Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a double-precision floating-point number.

virtual double System::Xml::XmlReader::ReadElementContentAsDouble(String localName, String namespaceURI)

Arguments

ParameterTypeDescription
localNameStringThe local name of the element.
namespaceURIStringThe namespace URI of the element.

Return Value

The element content as a double-precision floating-point number.

Exceptions

ExceptionDescription
InvalidOperationExceptionThe XmlReader is not positioned on an element.
XmlExceptionThe current element contains child elements. The element content cannot be converted to the requested type.
ArgumentNullExceptionThe method is called with nullptr arguments.
ArgumentExceptionThe specified local name and namespace URI do not match that of the current element being read.

See Also