XmlSchemaDatatype.ChangeType Método

Definição

Converte o valor especificado, cujo tipo é uma das representações válidas do CLR (Common Language Runtime) do tipo de esquema XML representado pelo XmlSchemaDatatype, em outra representação válida do CLR do mesmo valor.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 another valid CLR representation of the same value.

Sobrecargas

ChangeType(Object, Type)

Converte o valor especificado, cujo tipo é uma das representações válidas do CLR (Common Language Runtime) do tipo de esquema XML representado pelo XmlSchemaDatatype, no tipo do CLR especificado.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.

ChangeType(Object, Type, IXmlNamespaceResolver)

Converterá o valor especificado, cujo tipo é uma das representações válidas do CLR (Common Language Runtime) do tipo de esquema XML representado pelo XmlSchemaDatatype, no tipo CLR especificado usando o IXmlNamespaceResolver se o XmlSchemaDatatype representar o tipo xs:QName ou um tipo derivado dele.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.

ChangeType(Object, Type)

Converte o valor especificado, cujo tipo é uma das representações válidas do CLR (Common Language Runtime) do tipo de esquema XML representado pelo XmlSchemaDatatype, no tipo do CLR especificado.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.

public:
 virtual System::Object ^ ChangeType(System::Object ^ value, Type ^ targetType);
public virtual object ChangeType (object value, Type targetType);
abstract member ChangeType : obj * Type -> obj
override this.ChangeType : obj * Type -> obj
Public Overridable Function ChangeType (value As Object, targetType As Type) As Object

Parâmetros

value
Object

O valor de entrada a ser convertido no tipo especificado.The input value to convert to the specified type.

targetType
Type

O tipo de destino a ser convertido no valor de entrada.The target type to convert the input value to.

Retornos

Object

O valor de entrada convertido.The converted input value.

Exceções

O parâmetro Object ou Type é null.The Object or Type parameter is null.

O tipo representado pelo XmlSchemaDatatype não dá suporte a uma conversão de tipo do valor especificado para o tipo especificado.The type represented by the XmlSchemaDatatype does not support a conversion from type of the value specified to the type specified.

Comentários

Para obter mais informações sobre o suporte de tipo nas System.Xml classes e na conversão de tipos de dados XML, consulte o suporte de tipo no tópico classes de System.Xml .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.

Aplica-se a

ChangeType(Object, Type, IXmlNamespaceResolver)

Converterá o valor especificado, cujo tipo é uma das representações válidas do CLR (Common Language Runtime) do tipo de esquema XML representado pelo XmlSchemaDatatype, no tipo CLR especificado usando o IXmlNamespaceResolver se o XmlSchemaDatatype representar o tipo xs:QName ou um tipo derivado dele.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.

public:
 virtual System::Object ^ ChangeType(System::Object ^ value, Type ^ targetType, System::Xml::IXmlNamespaceResolver ^ namespaceResolver);
public virtual object ChangeType (object value, Type targetType, System.Xml.IXmlNamespaceResolver namespaceResolver);
abstract member ChangeType : obj * Type * System.Xml.IXmlNamespaceResolver -> obj
override this.ChangeType : obj * Type * System.Xml.IXmlNamespaceResolver -> obj
Public Overridable Function ChangeType (value As Object, targetType As Type, namespaceResolver As IXmlNamespaceResolver) As Object

Parâmetros

value
Object

O valor de entrada a ser convertido no tipo especificado.The input value to convert to the specified type.

targetType
Type

O tipo de destino a ser convertido no valor de entrada.The target type to convert the input value to.

namespaceResolver
IXmlNamespaceResolver

Um IXmlNamespaceResolver usado para resolver os prefixos de namespace.An IXmlNamespaceResolver used for resolving namespace prefixes. Somente será usado se o XmlSchemaDatatype representar o tipo xs:QName ou um tipo derivado dele.This is only of use if the XmlSchemaDatatype represents the xs:QName type or a type derived from it.

Retornos

Object

O valor de entrada convertido.The converted input value.

Exceções

O parâmetro Object ou Type é null.The Object or Type parameter is null.

O tipo representado pelo XmlSchemaDatatype não dá suporte a uma conversão de tipo do valor especificado para o tipo especificado.The type represented by the XmlSchemaDatatype does not support a conversion from type of the value specified to the type specified.

Comentários

Para obter mais informações sobre o suporte de tipo nas System.Xml classes e na conversão de tipos de dados XML, consulte o suporte de tipo no tópico classes de System.Xml .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.

Aplica-se a