Exemplo n.º 1
0
        static void ReverseTest(string input, int count, DelegateReverse method)
        {
            Stopwatch sp = new Stopwatch();

            sp.Start();
            string str = "";

            for (int i = 0; i < count; i++)
            {
                str = method(input);
            }
            sp.Stop();
            Console.WriteLine("{0}\t: {1}ms", method.Method.Name, sp.Elapsed.TotalMilliseconds);
            //Console.WriteLine(str);
        }
Exemplo n.º 2
0
 static void ReverseTest(string input, int count, DelegateReverse method)
 {
     Stopwatch sp = new Stopwatch();
     sp.Start();
     string str = "";
     for (int i = 0; i < count; i++)
     {
         str = method(input);
     }
     sp.Stop();
     Console.WriteLine("{0}\t: {1}ms", method.Method.Name, sp.Elapsed.TotalMilliseconds);
     //Console.WriteLine(str);
 }