RectangleConverter.CanConvertFrom(ITypeDescriptorContext, Type) Método

Definição

Determina se esse conversor pode converter um objeto no tipo de origem especificado para o tipo nativo do conversor.Determines if this converter can convert an object in the given source type to the native type of the converter.

public:
 override bool CanConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ context, Type ^ sourceType);
public override bool CanConvertFrom (System.ComponentModel.ITypeDescriptorContext context, Type sourceType);
override this.CanConvertFrom : System.ComponentModel.ITypeDescriptorContext * Type -> bool
Public Overrides Function CanConvertFrom (context As ITypeDescriptorContext, sourceType As Type) As Boolean

Parâmetros

context
ITypeDescriptorContext

Um contexto do formatador.A formatter context. Esse objeto pode ser usado para obter mais informações sobre o ambiente do qual este conversor está sendo chamado.This object can be used to get additional information about the environment this converter is being called from. Isso pode ser null, portanto, você sempre deve verificar.This may be null, so you should always check. Além disso, as propriedades no objeto de contexto também podem retornar null.Also, properties on the context object may also return null.

sourceType
Type

O tipo do qual você deseja converter.The type you want to convert from.

Retornos

Boolean

Este método retornará true se este objeto puder realizar a conversão; caso contrário, false.This method returns true if this object can perform the conversion; otherwise, false.

Aplica-se a