T
The type to which the value read should be converted to.
Noemax FastInfoset.NET Report an issue | Discuss in forums
XmlFastInfosetReader.ReadAs<T>() Method
See Also 
Noemax.FastInfoset Assembly > Noemax.FastInfoset Namespace > XmlFastInfosetReader Class : Generic ReadAs Method



Reads the value from the current position in the stream as the type specified.


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

Syntax

Visual Basic (Declaration) 
Public Function ReadAs(Of T)() As T
Visual Basic (Usage)Copy Code
Dim instance As XmlFastInfosetReader
Dim value As T
 
value = instance.ReadAs(Of T)()
C# 
public T ReadAs<T>()
C++/CLI 
public:
T ReadAsgeneric<typename T>
(); 

Type Parameters

T
The type to which the value read should be converted to.

Return Value

The value of the type T read from the stream.

Remarks

If the value in the stream was encoded as a different type, the reader converts it to the required type. For example if the stream contains a binary encoded int value and a double value was requested, the reader will perform an int to double conversion automatically.

Version Information

.NET Framework

Supported in: 3.5, 3.0, 2.0

.NET Compact Framework

Supported in: 3.5, 2.0

See Also