RectangleConverter.CanConvertFrom(ITypeDescriptorContext, Type) Metodo
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Determina se questo convertitore può convertire un oggetto del tipo di origine specificato nel tipo nativo del convertitore.
public:
override bool CanConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ context, Type ^ sourceType);
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
- context
- ITypeDescriptorContext
Contesto di un formattatore. Questo oggetto può essere usato per ottenere informazioni aggiuntive sull'ambiente da cui viene chiamato il convertitore. Poiché può essere null
, è sempre consigliabile eseguire un controllo. Anche le proprietà dell'oggetto contesto possono restituire null
.
- sourceType
- Type
Tipo da cui si vuole eseguire la conversione.
Questo metodo restituisce true
se l'oggetto è in grado di eseguire la conversione, in caso contrario restituisce false
.
Prodotto | Versioni |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.1 |
Feedback su .NET
.NET è un progetto open source. Seleziona un collegamento per fornire feedback: