void MainFormLoad(object sender, EventArgs e)
{
this.Text = GetToZHString(1234325.78f);
}
public static string GetToZHString(float value)
{
string str = "";
string[] s = { "", "", "", "", "", "", "", "", "", "", "亿", "", "", "" };
char[] c = { '', '', '', '', '', '', '', '', '', '' };
bool b = value < 0;
if (b)
{
value = 0 - value;str = "";
}
string temp = value.ToString("#0.00").Replace(".", string.Empty);

int count = temp.Length - 1;
for (int i = 0; i <= count; i++)
{
str += c[int.Parse(temp[i].ToString())] + s[count - i];
}
return str;
}

相关文章:

  • 2022-01-09
  • 2022-12-23
  • 2021-10-05
  • 2021-11-28
  • 2022-03-08
  • 2021-06-29
  • 2022-12-23
猜你喜欢
  • 2021-06-24
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2022-12-23
  • 2022-12-23
  • 2022-02-14
相关资源
相似解决方案