IconConverter::ConvertTo Method (ITypeDescriptorContext^, CultureInfo^, Object^, Type^)
.NET Framework (current version)
Namespace:
System.Drawing
Assembly: System.Drawing (in System.Drawing.dll)
Return to top
Assembly: System.Drawing (in System.Drawing.dll)
public: virtual Object^ ConvertTo( ITypeDescriptorContext^ context, CultureInfo^ culture, Object^ value, Type^ destinationType ) override
Parameters
- context
-
Type:
System.ComponentModel::ITypeDescriptorContext^
An ITypeDescriptorContext that provides a format context.
- culture
-
Type:
System.Globalization::CultureInfo^
A CultureInfo object that specifies formatting conventions used by a particular culture.
- value
-
Type:
System::Object^
The object to convert. This object should be of type icon or some type that can be cast to Icon.
- destinationType
-
Type:
System::Type^
The type to convert the icon to.
| Exception | Condition |
|---|---|
| NotSupportedException | The conversion could not be performed. |
The default implementation calls the ToString method on the object if the object is valid and if the destination type is string. If this method cannot convert to the destination type, it throws a NotSupportedException exception.
.NET Framework
Available since 1.1
Available since 1.1
Show: