String.IConvertible.ToType(Type, IFormatProvider) Método
Definição
Para obter uma descrição desse membro, confira ToType(Type, IFormatProvider).For a description of this member, see ToType(Type, IFormatProvider).
virtual System::Object ^ System.IConvertible.ToType(Type ^ type, IFormatProvider ^ provider) = IConvertible::ToType;
object IConvertible.ToType (Type type, IFormatProvider provider);
abstract member System.IConvertible.ToType : Type * IFormatProvider -> obj
override this.System.IConvertible.ToType : Type * IFormatProvider -> obj
Function ToType (type As Type, provider As IFormatProvider) As Object Implements IConvertible.ToType
Parâmetros
- type
- Type
O tipo do objeto retornado.The type of the returned object.
- provider
- IFormatProvider
Um objeto que fornece informações de formatação específicas de cultura.An object that provides culture-specific formatting information.
Retornos
O valor convertido do objeto String atual.The converted value of the current String object.
Implementações
Exceções
type é null.type is null.
O valor do objeto String atual não pode ser convertido para o tipo especificado pelo parâmetro type.The value of the current String object cannot be converted to the type specified by the type parameter.
Comentários
Este membro é uma implementação do membro de interface explícita.This member is an explicit interface member implementation. Ele só pode ser usado quando a instância de String é convertida em uma interface de IConvertible.It can be used only when the String instance is cast to an IConvertible interface. A alternativa recomendada é chamar o ChangeType método.The recommended alternative is to call the ChangeType method.