RM.Common/DotNetCode/RMBHelper.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
namespace RM.Common.DotNetCode
{
public class RMBHelper
{
public static string CmycurD(decimal num)
{
string str = "零壹贰叁肆伍陆柒捌玖";
string str2 = "万仟佰拾亿仟佰拾万仟佰拾元角分";
string str3 = "";
string ch2 = "";
int nzero = 0;
num = Math.Round(Math.Abs(num), 2);
string str4 = ((long)(num * 100m)).ToString();
int i = str4.Length;
string result;
if (i > 15)
{
result = "溢出";
}
else
{
str2 = str2.Substring(15 - i);
for (int j = 0; j < i; j++)
{
string str5 = str4.Substring(j, 1);
int temp = Convert.ToInt32(str5);
string ch3;
if (j != i - 3 && j != i - 7 && j != i - 11 && j != i - 15)
{
if (str5 == "0")
{
ch3 = "";
ch2 = "";
nzero++;
}
else
{
if (str5 != "0" && nzero != 0)
{
ch3 = "零" + str.Substring(temp, 1);
ch2 = str2.Substring(j, 1);
nzero = 0;
}
else
{
ch3 = str.Substring(temp, 1);
ch2 = str2.Substring(j, 1);
nzero = 0;
}
}
}
else
{
if (str5 != "0" && nzero != 0)
{
ch3 = "零" + str.Substring(temp, 1);
ch2 = str2.Substring(j, 1);
nzero = 0;
后面还有 69 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
