Gemstone Common Library
Show/Hide TOC

# VoltageConverterConvertTo(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.143 -- Release Build+524337d392fd5616b12b50022b004322b9e7c330
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

VoltageConverter Class
ConvertTo Overload
Gemstone.Units Namespace