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!

DateTime.ToUInt16

Converts this instance to a UInt16.

[Visual Basic]
Overridable Public Function ToUInt16() As UInt16
[C#]
public virtual ushort ToUInt16();
[C++]
public: virtual unsigned short ToUInt16();
[JScript]
public function ToUInt16() : UInt16;

Return Value

The UInt16value for this instance.

Exceptions

Exception Type Condition
InvalidCastException If this DateTime is not a UInt16 value.

Remarks

The ToUInt16 method casts this DateTime instance into a UInt16 value. An exception is thrown if this instance cannot be coerced into an 16-bit unsigned integer (ushort).

See Also

DateTime Structure | DateTime Members | System Namespace | UInt16 | Int16