System.DateTime.System.IConvertible.ToType Method

Converts the current DateTime object to an object of a specified type.

Syntax

object System.IConvertible.ToType (Type targetType, IFormatProvider provider)

Parameters

targetType
Documentation for this section has not yet been entered.
provider
An object that implements the IFormatProvider interface. (This parameter is not used; specify null.)

Returns

An object of the type specified by the type parameter, with a value equivalent to the current DateTime object.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0