DynamicResourceExtensionConverter.ConvertTo Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Konverterar det angivna objektet till en annan typ.
public:
override System::Object ^ ConvertTo(System::ComponentModel::ITypeDescriptorContext ^ context, System::Globalization::CultureInfo ^ culture, System::Object ^ value, Type ^ destinationType);
[System.Security.SecurityCritical]
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType);
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType);
[<System.Security.SecurityCritical>]
override this.ConvertTo : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj * Type -> obj
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
Parametrar
- context
- ITypeDescriptorContext
Ett ITypeDescriptorContext objekt som tillhandahåller en formatkontext.
- culture
- CultureInfo
Ett CultureInfo objekt som anger vilken kultur som ska representera talet.
- value
- Object
Värde som ska konverteras. Detta förväntas vara av typen DynamicResourceExtension.
- destinationType
- Type
Typ som ska konverteras till.
Returer
Det returnerade konverterade objektet. Casta detta till den begärda typen. Normalt bör detta kastas till InstanceDescriptor.
- Attribut
Undantag
value kunde inte tilldelas som DynamicResourceExtension.
value är null.
Kommentarer
destinationType förväntas vara av typen InstanceDescriptor; om inte, faller implementeringen igenom till basen (ConvertTovilket kan utlösa ett undantag).