中文大写

c#金额转换成中文大写金额

拜拜、爱过 提交于 2020-02-28 07:16:17
原文: c#金额转换成中文大写金额 2018-08-24 转别人 c#金额转换成中文大写金额 /// <summary> /// 金额转换成中文大写金额 /// </summary> /// <param name="LowerMoney">eg:10.74</param> /// <returns></returns> public static string MoneyToUpper(string LowerMoney) { string functionReturnValue = null; bool IsNegative = false; // 是否是负数 if (LowerMoney.Trim().Substring(0, 1) == "-") { // 是负数则先转为正数 LowerMoney = LowerMoney.Trim().Remove(0, 1); IsNegative = true; } string strLower = null; string strUpart = null; string strUpper = null; int iTemp = 0; // 保留两位小数 123.489→123.49  123.4→123.4 LowerMoney = Math.Round(double.Parse(LowerMoney), 2).ToString(