Comparteix a través de


ObjectConverter.ConvertValue(Object, Type, String) Método

Definición

Convierte un objeto de un tipo a otro. Esta clase está obsoleta. Utilice la clase Convert y el método Format(String, Object) en su lugar.

Esta API admite la infraestructura de producto y no está pensada para usarse directamente en el código.

public:
 static System::Object ^ ConvertValue(System::Object ^ value, Type ^ toType, System::String ^ formatString);
public static object ConvertValue (object value, Type toType, string formatString);
static member ConvertValue : obj * Type * string -> obj
Public Shared Function ConvertValue (value As Object, toType As Type, formatString As String) As Object

Parámetros

value
Object

Objeto que se va a convertir.

toType
Type

Objeto Type al que se va a convertir value.

formatString
String

Cadena de formato que se va a aplicar durante la conversión.

Devoluciones

Object

El objeto convertido.

Excepciones

Value no se puede convertir al tipo toType con este método.

Se aplica a