DurationConverter.CanConvertFrom(ITypeDescriptorContext, Type) DurationConverter.CanConvertFrom(ITypeDescriptorContext, Type) DurationConverter.CanConvertFrom(ITypeDescriptorContext, Type) DurationConverter.CanConvertFrom(ITypeDescriptorContext, Type) Method

定義

判斷是否可將指定的型別轉換成 Duration 的執行個體。Determines if conversion from a given type to an instance of Duration is possible.

public:
 override bool CanConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ td, Type ^ t);
public override bool CanConvertFrom (System.ComponentModel.ITypeDescriptorContext td, Type t);
override this.CanConvertFrom : System.ComponentModel.ITypeDescriptorContext * Type -> bool
Public Overrides Function CanConvertFrom (td As ITypeDescriptorContext, t As Type) As Boolean

參數

td
ITypeDescriptorContext ITypeDescriptorContext ITypeDescriptorContext ITypeDescriptorContext

用於轉換的內容資訊。Context information used for conversion.

t
Type Type Type Type

正在評估以進行轉換的型別。Type being evaluated for conversion.

傳回

如果 true 屬於類型 t,則為 String,否則為 falsetrue if t is of type String; otherwise, false.

適用於