ArrayConverter.ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type) Método
Definição
Converte o objeto de valor especificado para o tipo de destino especificado.Converts the given value object to the specified destination type.
public:
override System::Object ^ ConvertTo(System::ComponentModel::ITypeDescriptorContext ^ context, System::Globalization::CultureInfo ^ culture, System::Object ^ value, Type ^ destinationType);
public override object ConvertTo (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType);
override this.ConvertTo : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj * Type -> obj
Public Overrides Function ConvertTo (context As ITypeDescriptorContext, culture As CultureInfo, value As Object, destinationType As Type) 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 valor convertido.An Object that represents the converted value.
Exceções
destinationType é null.destinationType is null.
A conversão não pode ser executada.The conversion cannot be performed.
Comentários
Esse conversor pode converter uma matriz em uma cadeia de caracteres.This converter can convert an array to a string.
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.
Observação
O resultado convertido será mostrado no navegador de propriedades.The converted result will be shown in the property browser. Por exemplo, se você estiver convertendo uma matriz char em uma cadeia de caracteres, ela será exibida como char[] array .For example, if you are converting a char array into a string, it will be displayed as char[] array.