简体   繁体   中英

ASP.NET C# SQL Server Money format

我在开发网上商店时遇到问题,但是当我不得不将数据发布到Payment Gateway上时,我需要赚钱,例如1,00$变成100,但是在SQL Server数据库中是1,0000 ,当我使用价格格式字符串{0:c}那么如何将其转换为100?

take the dollars * 100 to get it to the whole number value. Do not use the string formatter and you will just have the numeric value.

ie

(Price*100).ToString();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM