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.154 -- Release Build+24a4f4795f9fb8aaeeb777ef1e3e0158effe5bad
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