コード例 #1
0
ファイル: Program.cs プロジェクト: glennawatson/coverdotnet
        /// <summary>
        /// The main execution point of the program.
        /// </summary>
        /// <param name="args">The arguments from the command line.</param>
        public static void Main(string[] args)
        {
            Console.WriteLine("Test application");
            Console.WriteLine("Arguments: " + string.Join(", ", args));

            var bigClass = new BigClass();

            bigClass.Do(100);
        }
コード例 #2
0
        public void TestPerformance(int iterations)
        {
            var big = new BigClass();

            for (var i = 0; i < iterations; i++)
            {
                big.Do(i);
            }
        }
コード例 #3
0
        public void TestPerformance(int iterations)
        {
            var big = new BigClass();

            List <Task> tasks = new List <Task>();

            for (var i = 0; i < iterations; i++)
            {
                tasks.Add(Task.Run(() => big.Do(i)));
            }

            Task.WaitAll(tasks.ToArray());
        }