DateTimeOffsetConverter::ConvertTo Method (ITypeDescriptorContext^, CultureInfo^, Object^, Type^)

 

Converts a DateTimeOffset to an object of the specified type.

Namespace:   System.ComponentModel
Assembly:  System (in System.dll)

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

Parameters

context
Type: System.ComponentModel::ITypeDescriptorContext^

The date format context.

culture
Type: System.Globalization::CultureInfo^

The date culture.

value
Type: System::Object^

The DateTimeOffset to be converted.

destinationType
Type: System::Type^

The type to convert to.

Return Value

Type: System::Object^

An object of the specified type that represents the DateTimeOffset.

Exception Condition
NotSupportedException

The conversion cannot be performed.

.NET Framework
Available since 2.0
Return to top
Show: