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

◆ ToSByte() [1/3]

static sbyte System.Decimal.ToSByte ( decimal value)
inlinestatic

Definition at line 2644 of file Decimal.cs.

2645 {
2646 int num;
2647 try
2648 {
2649 num = ToInt32(value);
2650 }
2651 catch (OverflowException)
2652 {
2653 Number.ThrowOverflowException(TypeCode.SByte);
2654 throw;
2655 }
2656 if (num != (sbyte)num)
2657 {
2658 Number.ThrowOverflowException(TypeCode.SByte);
2659 }
2660 return (sbyte)num;
2661 }
static int ToInt32(decimal d)
Definition Decimal.cs:2687

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

Referenced by System.Decimal.operator sbyte().