Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TypeConverter.GetConvertToException Method (Object, Type)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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

Namespace:   System.ComponentModel
Assembly:  System (in System.dll)

member GetConvertToException : 
        value:Object *
        destinationType:Type -> Exception


Type: System.Object

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

Type: System.Type

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

Return Value

Type: System.Exception

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

Exception Condition

Automatically thrown by this method.

.NET Framework
Available since 1.1
Return to top
© 2018 Microsoft