Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
BinXmlSqlMoney.cs
Go to the documentation of this file.
2
3namespace System.Xml;
4
5internal struct BinXmlSqlMoney
6{
7 private readonly long _data;
8
9 public BinXmlSqlMoney(int v)
10 {
11 _data = v;
12 }
13
14 public BinXmlSqlMoney(long v)
15 {
16 _data = v;
17 }
18
19 public decimal ToDecimal()
20 {
21 bool isNegative;
22 ulong num;
23 if (_data < 0)
24 {
25 isNegative = true;
26 num = (ulong)(-_data);
27 }
28 else
29 {
30 isNegative = false;
31 num = (ulong)_data;
32 }
33 return new decimal((int)num, (int)(num >> 32), 0, isNegative, 4);
34 }
35
36 public override string ToString()
37 {
38 return ToDecimal().ToString("#0.00##", CultureInfo.InvariantCulture);
39 }
40}
static CultureInfo InvariantCulture
override string ToString()