Noemax FastInfoset.NET Report an issue | Discuss in forums
XmlFastInfosetReader.ReadContentAs(Type,IXmlNamespaceResolver) Method
See Also 
Noemax.FastInfoset Assembly > Noemax.FastInfoset Namespace > XmlFastInfosetReader Class > ReadContentAs Method : ReadContentAs(Type,IXmlNamespaceResolver) Method



returnType
The type of the value to be returned.
namespaceResolver

An IXmlNamespaceResolver object that is used to resolve any namespace prefixes related to type conversion.

Reads the content at the current position as the a value of the type specified.


Namespace: Noemax.FastInfoset
Assembly: Noemax.FastInfoset (in Noemax.FastInfoset.dll)

Syntax

Visual Basic (Declaration) 
Overloads Overrides Public NotOverridable Function ReadContentAs( _
   ByVal returnType As Type, _
   ByVal namespaceResolver As IXmlNamespaceResolver _
) As Object
Visual Basic (Usage)Copy Code
Dim instance As XmlFastInfosetReader
Dim returnType As Type
Dim namespaceResolver As IXmlNamespaceResolver
Dim value As Object
 
value = instance.ReadContentAs(returnType, namespaceResolver)
C# 
public override object ReadContentAs( 
   Type returnType,
   IXmlNamespaceResolver namespaceResolver
)
C++/CLI 
public:
Object^ ReadContentAs( 
   Type^ returnType,
   IXmlNamespaceResolver namespaceResolver
) override 

Parameters

returnType
The type of the value to be returned.
namespaceResolver

An IXmlNamespaceResolver object that is used to resolve any namespace prefixes related to type conversion.

Return Value

The content converted to the requested typed object.

Remarks

This method reads the content at the current reader position and converts it to the requested return type. Only binary content, text, white space, significant white space and CDATA sections are getting processed.

If the content is not encoded as data of T type, the reader will try to perform a type conversion.

See XmlReader.ReadContentAs for more detailed description of the reader behavior.

Version Information

.NET Framework

Supported in: 3.5, 3.0, 2.0

.NET Compact Framework

Supported in: 3.5, 2.0

See Also

Reference

XmlFastInfosetReader Class
XmlFastInfosetReader Members
Overload List
Base Implementation in System.Xml.XmlReader