System.Xml.XmlReader.ReadElementContentAsLong Method

Reads the current element and returns the contents as a 64-bit signed integer.

Syntax

public virtual long ReadElementContentAsLong ()

Returns

The element content as a 64-bit signed integer.

Remarks

This method reads the start tag, the contents of the element, and moves the reader past the end element tag. It expands entities and ignores processing instructions and comments. The element can only contain simple content. That is, it cannot have child elements.

If the content is typed xsd:long, the reader returns an unboxed 64-bit signed integer. If the content is not typed xsd:long, the reader attempts to convert it to a 64-bit signed integer according to the rules defined by the tp://go.microsoft.com/fwlink/?LinkId=4871 recommendation.

For more information, see Reading Typed Data.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0