NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

TypeConverter.ConvertTo (Object, Type, Object[])

Converts the given object to another type.

[Visual Basic]
Overloads Public Function ConvertTo( _
   ByVal value As Object, _
   ByVal destinationType As Type, _
   ByVal arguments() As Object _
) As Object
[C#]
public object ConvertTo(
   object value,
   Type destinationType,
   object[] arguments
);
[C++]
public: Object* ConvertTo(
   Object* value,
   Type* destinationType,
   Object* arguments[]
);
[JScript]
public function ConvertTo(
   value : Object,
   destinationType : Type,
   arguments : Object[]
) : Object;

Parameters

value
The object to convert.
destinationType
The type to convert the object to.
arguments
An optional array of arguments to use when doing the conversion. The number and content of these arguments is dependent on the implementer of the value formatter.

Return Value

The converted object.

Exceptions

Exception Type Condition
NotSupportedException The conversion could not be performed.

Remarks

The most common types to convert are to and from a string object.

The default implementation will make a call to ToString on the object if the object is valid and if the destination type is string.

See Also

TypeConverter Class | TypeConverter Members | System.ComponentModel Namespace | TypeConverter.ConvertTo Overload List