System.Xml.XmlReader.ReadElementContentAsAsync Method

Asynchronously reads the element content as the requested type.

Syntax

public virtual System.Threading.Tasks.Task<object> ReadElementContentAsAsync (Type returnType, IXmlNamespaceResolver namespaceResolver)

Parameters

returnType
The type of the value to be returned.
namespaceResolver
An System.Xml.IXmlNamespaceResolver object that is used to resolve any namespace prefixes related to type conversion.

Returns

The element content converted to the requested typed object.

Remarks

This is the asynchronous version of XmlReader.ReadElementContentAs(Type, IXmlNamespaceResolver), with the same functionality. To use this method, you must set the XmlReaderSettings.Async flag to true.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 4.0.0.0