[This is preliminary documentation and is subject to change.]
Gets the current node's value as the Type specified, using the IXmlNamespaceResolver object specified to resolve namespace prefixes.
Namespace: Tools.XmlT.XPathTAssembly: Tools (in Tools.dll) Version: 1.5.3.38916 (1.5.3.38916)
Syntax
| C# |
|---|
public override Object ValueAs( Type returnType, IXmlNamespaceResolver nsResolver ) |
| Visual Basic |
|---|
Public Overrides Function ValueAs ( _ returnType As Type, _ nsResolver As IXmlNamespaceResolver _ ) As Object |
| Visual C++ |
|---|
public: virtual Object^ ValueAs( Type^ returnType, IXmlNamespaceResolver^ nsResolver ) override |
| F# |
|---|
abstract ValueAs : returnType:Type * nsResolver:IXmlNamespaceResolver -> Object override ValueAs : returnType:Type * nsResolver:IXmlNamespaceResolver -> Object |
| JScript |
|---|
public override function ValueAs( returnType : Type, nsResolver : IXmlNamespaceResolver ) : Object |
Parameters
- returnType
- Type: System..::..Type
The Type to return the current node's value as.
- nsResolver
- Type: System.Xml..::..IXmlNamespaceResolver
The IXmlNamespaceResolver object used to resolve namespace prefixes.
Return Value
The value of the current node as the Type requested. If ValueType is subclass of (or is itself) or implements returnType then ContextValue is returned. Otherwise ValueAs(Type, IXmlNamespaceResolver) is called
Exceptions
| Exception | Condition |
|---|---|
| System..::..InvalidCastException | The attempted cast is not valid. |
| System..::..FormatException | The current node's value is not in the correct format for the target type. |