Converts this instance of Decimal to a UInt16.
[Visual Basic] Overloads Overridable Public Function ToUInt16() As UInt16 [C#] public virtual ushort ToUInt16(); [C++] public: virtual unsigned short ToUInt16(); [JScript] public function ToUInt16() : UInt16;
The result's of converting the Decimal to a UInt16 value.
Exception Type | Condition |
---|---|
OverflowException | if the resulting integer value is less than UInt16.MinValue or greater than UInt16.MaxValue. |
The ToUInt16 method converts a Decimal value into a UInt16 and returns it.
Decimal Structure | Decimal Members | System Namespace | Decimal.ToUInt16 Overload List