Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 C# 中从 excel 加载值,然后将其转换为字符串,然后我想将其保存在 SQL Server 2008 R2 中。如何捕捉或重新格式化像 0.3333333333 这样的浮点数?
我收到以下错误:指定的演员表无效。
你可以试试这个:
int number = 1; float number2 = (float)number; number2.toString("0.00") //2dp - add more zeros to define the number of dp you want