C#中利用正则表达式将人民币金额转换为大写汉字

时间:2021-01-05 11:16:23
【文件属性】:
文件名称:C#中利用正则表达式将人民币金额转换为大写汉字
文件大小:31KB
文件格式:PDF
更新时间:2021-01-05 11:16:23
c# 人民币 人民币大写转换 直接来看代码: public static string ConvertToChineseMoney(double money) { if (money < 0) throw new ArgumentOutOfRangeException(参数money不能为负值!); string 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); s = Regex.Replace(s, @((?<=-|^)[^1-9]*)|((?'z'

网友评论