コード例 #1
0
        public void GivenIHaveTheStartTheThirdThread()
        {
            Variability varia   = new Variability();
            Thread      thread2 = new Thread(new ParameterizedThreadStart(varia.ThirdThread));

            thread2.Start("second");
            thread2.Join();
            varia.ThirdThread("main");
            Thread.Sleep(10000);
            thread2.Abort();
        }
コード例 #2
0
        public void GivenINameTheThread()
        {
            Thread.CurrentThread.Name = "main";
            Variability varia   = new Variability();
            Thread      thread2 = new Thread(new ParameterizedThreadStart(varia.ThirdThread));

            thread2.Name = "seconds";
            thread2.Start("second");
            thread2.Join();
            varia.ThirdThread("main");
            Thread.Sleep(10000);
            thread2.Abort();
        }