项目中经常遇见数字过大或过小的问题
本文以小数为例
double a = 0.00009;string b = a.ToString();decimal c = Convert.ToDecimal(decimal.Parse(a.ToString(), System.Globalization.NumberStyles.Float));string d = a.ToString(\"0.######################\");Console.WriteLine($\"b:{b}\");Console.WriteLine($\"c:{c}\");Console.WriteLine($\"d:{d}\");
运行结果如下
我是小赖,一个学C#的混子
爱站程序员基地
![(原创)[C#] 一步一步自定义拖拽(Drag&Drop)时的鼠标效果:(一)基本原理及基本实现-爱站程序员基地](https://aiznh.com/wp-content/uploads/2022/07/20220721231016-62d9dcd85c40b-220x150.gif)

