Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ToUInt16() [1/3]

static ushort System.Decimal.ToUInt16 ( decimal value)
inlinestatic

Definition at line 2738 of file Decimal.cs.

2739 {
2740 uint num;
2741 try
2742 {
2743 num = ToUInt32(value);
2744 }
2745 catch (OverflowException)
2746 {
2747 Number.ThrowOverflowException(TypeCode.UInt16);
2748 throw;
2749 }
2750 if (num != (ushort)num)
2751 {
2752 Number.ThrowOverflowException(TypeCode.UInt16);
2753 }
2754 return (ushort)num;
2755 }
static uint ToUInt32(decimal d)
Definition Decimal.cs:2758

References System.Number.ThrowOverflowException(), System.Decimal.ToUInt32(), and System.value.

Referenced by System.Decimal.operator char(), and System.Decimal.operator ushort().