ColorTypeConverter.ConvertTo Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Converts a Color to an object of the specified type.
public:
override System::Object ^ ConvertTo(System::ComponentModel::ITypeDescriptorContext ^ context, System::Globalization::CultureInfo ^ culture, System::Object ^ value, Type ^ destinationType);
public override object ConvertTo (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType);
override this.ConvertTo : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj * Type -> obj
Public Overrides Function ConvertTo (context As ITypeDescriptorContext, culture As CultureInfo, value As Object, destinationType As Type) As Object
Parameters
- context
- ITypeDescriptorContext
An object that provides contextual information.
- culture
- CultureInfo
The language and culture that are used during the conversion.
- value
- Object
The object you want to convert.
- destinationType
- Type
The type that value
is converted to.
Returns
The new Object of the designated type.
Exceptions
The destinationType
is not a type that value
can be converted to.
-or-
The culture
is a neutral culture.
Remarks
As implemented in this class, destinationType
must be a String or the exception is thrown. The format of the string varies according to the value of context
and culture
.
If culture
is null
, the current system culture is used.