TypeConverter.GetConvertToException(Object, Type) TypeConverter.GetConvertToException(Object, Type) TypeConverter.GetConvertToException(Object, Type) TypeConverter.GetConvertToException(Object, Type) Method

Definition

Returns an exception to throw when a conversion cannot be performed.

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

Parameters

value
Object Object Object Object

The Object to convert, or null if the object is not available.

destinationType
Type Type Type Type

A Type that represents the type the conversion was trying to convert to.

Returns

An Exception that represents the exception to throw when a conversion cannot be performed.

Exceptions

Applies to