RectConverter.ConvertTo 方法

定義

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

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

參數

context
ITypeDescriptorContext

提供轉換所需的內容資訊。

culture
CultureInfo

轉換期間遵守的文化特性資訊。

value
Object

要進行轉換的 Rect

destinationType
Type

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

傳回

Object

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

例外狀況

valuenull

-或- value 不是 Rect

-或- destinationType 不是其中一個有效的轉換型別。

備註

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

適用於