Converts this instance into a Single.
[Visual Basic] Overridable Public Function ToSingle() As Single [C#] public virtual float ToSingle(); [C++] public: virtual float ToSingle(); [JScript] public function ToSingle() : float;
The Single value for this instance.
Exception Type | Condition |
---|---|
InvalidCastException | If this DateTime is not a Single value. |
The ToSingle method casts this DateTime instance into a single-precision floating point number (Single) value. An exception is thrown if this instance cannot be coerced into a float.
DateTime Structure | DateTime Members | System Namespace | Single