XPathFunctionItem.ValueAs Method (Type, IXmlNamespaceResolver)XPathFunctionItem.ValueAs Method (Type, IXmlNamespaceResolver)XPathFunctionItem::ValueAs Method (Type^, IXmlNamespaceResolver^)
Returns the item's value as the type specified using the IXmlNamespaceResolverIXmlNamespaceResolverIXmlNamespaceResolver
object specified to resolve namespace prefixes.
Syntax
Public Overrides Function ValueAs( _ returnType As Type, _ nsResolver As System.Xml.IXmlNamespaceResolver _ ) As Object
public override object ValueAs( Type returnType, System.Xml.IXmlNamespaceResolver nsResolver )
public: virtual object^ ValueAs( Type^ returnType, System.Xml::IXmlNamespaceResolver^ nsResolver ) override
Parameters
- returnType
Type: System.TypeSystem.TypeSystem::Type^
The type to return the item value as.
- nsResolver
Type: System.Xml.IXmlNamespaceResolverSystem.Xml.IXmlNamespaceResolverSystem.Xml::IXmlNamespaceResolver^
The IXmlNamespaceResolverIXmlNamespaceResolverIXmlNamespaceResolver object used to resolve namespace prefixes.
Return Value
Type: System.ObjectSystem.ObjectSystem::Object^
The value of the item as the type requested.
Exceptions
Exception | Condition |
FormatExceptionFormatExceptionFormatException | The item's value is not in the correct format for the target type. |
InvalidCastExceptionInvalidCastExceptionInvalidCastException | The attempted cast is not valid. |
OverflowExceptionOverflowExceptionOverflowException | The attempted cast resulted in an overflow. |