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.181 -- Release Build+97279656b5a55675063a4190481e67c4f9809501
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