XmlSchemaDatatype::ChangeType Method (Object^, Type^, IXmlNamespaceResolver^)
Converts the value specified, whose type is one of the valid Common Language Runtime (CLR) representations of the XML schema type represented by the XmlSchemaDatatype, to the CLR type specified using the IXmlNamespaceResolver if the XmlSchemaDatatype represents the xs:QName type or a type derived from it.
Assembly: System.Xml (in System.Xml.dll)
public: virtual Object^ ChangeType( Object^ value, Type^ targetType, IXmlNamespaceResolver^ namespaceResolver )
Parameters
- value
-
Type:
System::Object^
The input value to convert to the specified type.
- targetType
-
Type:
System::Type^
The target type to convert the input value to.
- namespaceResolver
-
Type:
System.Xml::IXmlNamespaceResolver^
An IXmlNamespaceResolver used for resolving namespace prefixes. This is only of use if the XmlSchemaDatatype represents the xs:QName type or a type derived from it.
| Exception | Condition |
|---|---|
| ArgumentNullException | |
| InvalidCastException | The type represented by the XmlSchemaDatatype does not support a conversion from type of the value specified to the type specified. |
For more information about type support in the System.Xml classes and conversion of XML data types, see the Type Support in the System.Xml Classes topic.
Available since 2.0