コード例 #1
0
        public static string ToText(string numb)
        {
            String wholeNo = numb, points = "", andStr = "", pointStr = "";
            double val = Convert.ToDouble(numb);

            numb = string.Format("{0:########0.00}", val);
            int decimalPlace = numb.IndexOf(".");

            if (decimalPlace > 0)
            {
                wholeNo = numb.Substring(0, decimalPlace);
                points  = numb.Substring(decimalPlace + 1);
            }
            //points = (points == "00") ? "" : " & " + points + "/100";
            points = " & " + points + "/100";

            var numberText = new NumberText();

            //  return numberText.ToText(Convert.ToInt32(wholeNo)) + " " + points ;
            return(numberText.ToText(Convert.ToInt32(wholeNo)) + " " + points + " Only");
        }
コード例 #2
0
        public static string ToText(string numb)
        {
            String wholeNo = numb, points = "", andStr = "", pointStr = "";
            double val = Convert.ToDouble(numb);
            numb = string.Format("{0:########0.00}", val);
            int decimalPlace = numb.IndexOf(".");

            if (decimalPlace > 0)
            {
                wholeNo = numb.Substring(0, decimalPlace);
                points = numb.Substring(decimalPlace + 1);
            }
             //points = (points == "00") ? "" : " & " + points + "/100";
            points =  " & " + points + "/100";

            var numberText = new NumberText();
            //  return numberText.ToText(Convert.ToInt32(wholeNo)) + " " + points ;
            return numberText.ToText(Convert.ToInt32(wholeNo)) + " " + points + " Only";
        }