System.Xml.XmlReader.ReadContentAsAsync Method

Asynchronously reads the content as an object of the type specified.

Syntax

public virtual System.Threading.Tasks.Task<object> ReadContentAsAsync (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 concatenated text content or attribute value converted to the requested type.

Remarks

This is the asynchronous version of XmlReader.ReadContentAs(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