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.
我有一个问题,我正在开发一个网上商店,但是当我必须将数据发布到支付网关时,我需要钱才能1,00$达到 100,但在 SQL Server 数据库中1,0000,当我使用价格格式字符串时{0:c},怎么办我把它转换成100?
1,00$
1,0000
{0:c}
取美元 * 100 得到整数值。不要使用字符串格式化程序,你只会得到数值。
IE
(Price*100).ToString();