TypeConverter::GetConvertToException Method (Object^, Type^)

 
System_CAPS_noteNote

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

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

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

protected:
Exception^ GetConvertToException(
	Object^ value,
	Type^ destinationType
)

Parameters

value
Type: System::Object^

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

destinationType
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
NotSupportedException

Automatically thrown by this method.

.NET Framework
Available since 1.1
Return to top
Show: