登录后复制 #region 转换为 大写金额 /// <summary> /// 将数值转换 RMB 大写金额 /// </summary> /// <param name="money">待转换数值</param> /// <returns>大写金额</returns> public static string ToRMB(decimal money) { var s = money.ToString("#L#E#D#C#K#E#D#C#J#E#D#C#I#E#D#C#H#E#D#C#G#E#D#C#F#E#D#C#.0B0A"); var d = Regex.Replace(s, @"((?<=-|^)[^1-9]*)|((?'z'0)[0A-E]*((?=[1-9])|(?'-z'(?=[F-L\.]|$))))|((?'b'[F-L])(?'z'0)[0A-L]*((?=[1-9])|(?'-z'(?=[\.]|$))))", "${b}${z}"); var r = Regex.Replace(d, ".", m => "负元空零壹贰叁肆伍陆柒捌玖空空空空空空空分角拾佰仟万亿兆京垓秭穰"[m.Value[0] - '-'].ToString()); return r; } #endregion 1.2.3.4.5.6.7.8.9.10.11.12.13.14. 作者:꧁执笔小白꧂ 原创作者: u_16822845 转载于: https://blog.51cto.com/u_16822845/11676057