Ejemplo n.º 1
0
        private static void testMoney()
        {
            List <double> testList   = new List <double>();
            List <string> resultList = new List <string>();

            testList.Add(0101010001000000);
            testList.Add(0);
            testList.Add(01);
            testList.Add(012);
            testList.Add(01234);
            testList.Add(012345);
            testList.Add(123456);
            testList.Add(1234567);
            testList.Add(1234567);
            testList.Add(12345678);
            testList.Add(123456789);
            testList.Add(1234567899);
            testList.Add(123456789991234);

            for (int i = 0; i < testList.Count; i++)
            {
                Console.WriteLine("Number: " + testList[i]);
                Console.WriteLine("Money: " + ConvertToMoney.ConvertNo(testList[i]));
                resultList.Add("Number: " + testList[i].ToString("C0") + "\n" + "Money: " + ConvertToMoney.ConvertNo(testList[i]));
            }
            //return false;
            System.IO.File.WriteAllLines(@"F:\LUCND\WriteLines.txt", resultList);
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.OutputEncoding = System.Text.Encoding.UTF8;
            //string a = NumberToWords(1121399000);
            //string b = NumberToMoneyWord(a);
            //Console.Write(NumberToWords(1121399000));
            testMoney();
            var money = ConvertToMoney.ConvertNo(234);

            Console.ReadLine();
        }