ColorConverter.ConvertTo 方法

定義

嘗試將 Color 轉換為指定的型別。

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

參數

context
ITypeDescriptorContext

描述類型的內容資訊。

culture
CultureInfo

描述正要轉換之型別的 CultureInfo

value
Object

要進行轉換的 Color

destinationType
Type

要將這個 Color 轉換成的型別。

傳回

Object

轉換這個 Color 時建立的物件。

屬性

備註

若要判斷轉換是否可行,而不需要實際執行轉換,請使用 CanConvertTo 方法。

適用於