Gemstone Common Library
Show/Hide TOC

# TemperatureConverterConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type) Method

Converts the specified object to another type.

## Definition

Namespace: Gemstone.Units
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.159 -- Release Build+a612c25bc0e1c87e5766544ec4650d2ebcfddcf4
C#
View Source Request Example

    public override Object? ConvertTo(
    	ITypeDescriptorContext? context,
    	CultureInfo? culture,
    	Object? value,
    	Type destinationType
    )

VB
View Source Request Example

    Public Overrides Function ConvertTo (
    	context As ITypeDescriptorContext,
    	culture As CultureInfo,
    	value As Object,
    	destinationType As Type
    ) As Object

C++
View Source Request Example

    public:
    virtual Object^ ConvertTo(
    	ITypeDescriptorContext^ context,
    	CultureInfo^ culture,
    	Object^ value,
    	Type^ destinationType
    ) override

JavaScript
View Source Request Example

    function ConvertTo(context, culture, value, destinationType);

#### Parameters

context ITypeDescriptorContext
  An ITypeDescriptorContext that provides a format context.
culture CultureInfo
  A CultureInfo that specifies the culture to represent the number.
value Object
  The object to convert.
destinationType Type
  The type to convert the object to.

#### Return Value

Object
An Object that represents the converted value.

## Exceptions

ArgumentNullException | destinationType is .
NotSupportedException | The conversion cannot be performed.

## See Also

#### Reference

TemperatureConverter Class
ConvertTo Overload
Gemstone.Units Namespace