Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

TypeConverter.GetConvertToException Method

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

[Visual Basic]
Protected Function GetConvertToException( _
   ByVal value As Object, _
   ByVal destinationType As Type _
) As Exception
[C#]
protected Exception GetConvertToException(
 object value,
 Type destinationType
);
[C++]
protected: Exception* GetConvertToException(
 Object* value,
 Type* destinationType
);
[JScript]
protected function GetConvertToException(
   value : Object,
 destinationType : Type
) : Exception;

Parameters

value
The Object to convert, or a null reference (Nothing in Visual Basic) if the object is not available.
destinationType
A Type that represents the type the conversion was trying to convert to.

Return Value

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

Exceptions

Exception Type Condition
NotSupportedException Automatically thrown by this method.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

TypeConverter Class | TypeConverter Members | System.ComponentModel Namespace

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.