예제 #1
0
        public void TestBedFloat()
        {
            Console.Write("Your input: ");
            string input = Console.ReadLine();

            Console.WriteLine(ItMath.IsNumber(input));
        }
예제 #2
0
        private static void RunNumberTest(string[] testStringsBad, string[] testStringsGood)
        {
            Console.WriteLine("-- Testing bad strings --");
            foreach (String test in testStringsBad)
            {
                Console.WriteLine("String \"{0}\" is a number: {1}", test, ItMath.IsNumber(test));
            }

            Console.WriteLine("-- Testing good strings --");
            foreach (String test in testStringsGood)
            {
                Console.WriteLine("String \"{0}\" is a number: {1}", test, ItMath.IsNumber(test));
            }
        }