- public string Rmoney(int ftype, double fmoney)
- {
- string _rmoney;
- try
- {
- switch (ftype)
- {
- case 0:
- _rmoney = string.Format("{0:C2}", fmoney);
- break;
- case 1:
- _rmoney = string.Format("{0:N2}", fmoney);
- break;
- default:
- _rmoney = string.Format("{0:C2}", fmoney);
- break;
- }
- }
- catch
- {
- _rmoney = "";
- }
- return _rmoney;
- }
- public static string ConvertCurrency(decimal fmoney)
- {
- CultureInfo cul = null;
- int ftype=4;
- string _rmoney=string.Empty;
- try
- {
- switch (ftype)
- {
- case 0:
- cul = new CultureInfo("zh-CN");
- _rmoney = fmoney.ToString("c", cul);
- break;
- case 1:
- cul = new CultureInfo("zh-HK");
- _rmoney = fmoney.ToString("c", cul);
- break;
- case 2:
- cul = new CultureInfo("en-US");
- _rmoney = fmoney.ToString("c", cul);
- break;
- case 3:
- cul = new CultureInfo("en-GB");
- _rmoney = fmoney.ToString("c", cul);
- break;
- case 4:
- _rmoney = string.Format("{0:n}", fmoney);
- break;
- default:
- _rmoney = string.Format("{0:n}", fmoney);
- break;
- }
- }
- catch
- {
- _rmoney = "";
- }
- return _rmoney;
- }
相关文章:
-
2022-12-23
-
2022-02-12
-
2022-03-04
-
2021-05-29
-
2022-01-21
-
2021-08-30
-
2022-12-23
-
2022-12-23
猜你喜欢
-
2021-10-24
-
2022-12-23
-
2021-10-27
-
2022-01-09
-
2022-12-23
-
2021-05-31
-
2021-06-01
相关资源
-
下载
2022-12-30
-
下载
2023-01-10
-
下载
2021-06-22