TypeConverter.GetConvertToException(Object, Type) 方法

定義

傳回要在無法執行轉換時擲回的例外狀況。

protected:
 Exception ^ GetConvertToException(System::Object ^ value, Type ^ destinationType);
protected Exception GetConvertToException (object value, Type destinationType);
protected Exception GetConvertToException (object? value, Type destinationType);
member this.GetConvertToException : obj * Type -> Exception
Protected Function GetConvertToException (value As Object, destinationType As Type) As Exception

參數

value
Object

要轉換的 Object,如果無法取得物件,則為 null

destinationType
Type

Type,表示轉換嘗試轉換的型別。

傳回

Exception,表示無法執行轉換時將擲回的例外狀況。

例外狀況

由這個方法自動擲回。

適用於