TypeConverter.GetConvertToException(Object, Type) Metod

Definition

Returnerar ett undantag som ska utlösas när en konvertering inte kan utföras.

protected:
 Exception ^ GetConvertToException(System::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

Parametrar

value
Object

Att Object konvertera, eller null om objektet inte är tillgängligt.

destinationType
Type

En Type som representerar den typ som konverteringen försökte konvertera till.

Returer

En Exception som representerar undantaget som ska utlösas när en konvertering inte kan utföras.

Undantag

Genereras automatiskt av den här metoden.

Gäller för