Currency.cs

1.png
Main.cs

2.png
Tips
(1)盡量不損失精度的高級(jí)用法:Convert.ToUInt16
The System.Convert object contains a large number of static methods to perform various numerical conversions, and the one that we want is Convert.ToUInt16. Note that the extra care taken by the System.Convert methods comes at a performance cost. You should use them only when necessary.
但會(huì)損失一些效率