XPathItem::ValueAs Method (Type^)
.NET Framework (current version)
Returns the item's value as the specified type.
Assembly: System.Xml (in System.Xml.dll)
Parameters
- returnType
-
Type:
System::Type^
The type to return the item value as.
| Exception | Condition |
|---|---|
| FormatException | The item's value is not in the correct format for the target type. |
| InvalidCastException | The attempted cast is not valid. |
| OverflowException | The attempted cast resulted in an overflow. |
When overridden in a derived class, the ValueAs method attempts to convert the value of the item to the .NET Framework 2.0 type specified.
.NET Framework
Available since 2.0
Available since 2.0
Show: