【发布时间】:2015-06-06 09:56:47
【问题描述】:
如何将卢比转换为字母 asp.net ? 我已经尝试了下面的代码,但没有奏效。 var formatted = d.ToString();
if (formatted.Contains("."))
{
//If it contains a decimal point, split it into both sides of the decimal
string[] sides = formatted.Split(".");
//Process each side and append them with "and", "dot" or "point" etc.
return NumberToWords(Int32.Parse(sides[0])) + " and " + NumberToWords(Int32.Parse(sides[1]));
}
else
{
//Else process as normal
return NumberToWords(Convert.ToInt32(d));
}
注意:我需要以下格式
例如:23,234.50 - 230234 卢比和 50 派萨。
【问题讨论】:
-
定义“无效”。您是否记得实现了一个名为
NumberToWords的方法,或者您认为编译器会为您执行此操作?
标签: asp.net