CharConverter.ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) Método
Definição
Converte o objeto fornecido em um objeto de caractere Unicode.Converts the given object to a Unicode character object.
public:
override System::Object ^ ConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ context, System::Globalization::CultureInfo ^ culture, System::Object ^ value);
public override object ConvertFrom (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value);
override this.ConvertFrom : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj -> obj
Public Overrides Function ConvertFrom (context As ITypeDescriptorContext, culture As CultureInfo, value As Object) As Object
Parâmetros
- context
- ITypeDescriptorContext
Um ITypeDescriptorContext que fornece um contexto de formato.An ITypeDescriptorContext that provides a format context.
- culture
- CultureInfo
A cultura na qual o value será convertido.The culture into which value will be converted.
Retornos
Um Object que representa o value convertido.An Object that represents the converted value.
Exceções
value não é um valor válido para o tipo de destino.value is not a valid value for the target type.
A conversão não pode ser executada.The conversion cannot be performed.
Comentários
Esse conversor só pode converter uma cadeia de caracteres, com um comprimento de 1, de e para um caractere.This converter can only convert a string, with a length of 1, to and from a character.
O context parâmetro pode ser usado para extrair informações adicionais sobre o ambiente do qual esse conversor está sendo invocado.The context parameter can be used to extract additional information about the environment this converter is being invoked from. Isso pode ser null. Portanto, sempre verifique.This can be null, so always check. Além disso, as propriedades no objeto de contexto podem retornar null.Also, properties on the context object can return null.