TemplateKeyConverter.ConvertTo 方法

定義

使用指定的內容,嘗試將 TemplateKey 轉換為指定的型別。

C#
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType);

參數

context
ITypeDescriptorContext

格式內容,提供正在叫用此轉換器之環境的相關資訊。

culture
CultureInfo

特定文化特性 (Culture) 資訊。

value
Object

要轉換的物件。

destinationType
Type

要將物件轉換成的類型。

傳回

一律會擲回例外狀況。

例外狀況

無法轉換 value

備註

請參閱中的 TemplateKeyConverter

適用於

產品 版本
.NET Framework 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
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10