예제 #1
0
        public static void Main(string[] args)
        {
            var cukiThread = new Thread(SayWhatsup);
            var koceThread = new Thread(SayWhatsup);

            //Setup Cuki thread
            var cukiThreadStartOptions = new ThreadStartOptions { Color = ConsoleColor.Magenta, SleepTime = 1000 };
            cukiThread.Name = "Cuki";
            cukiThread.Start(cukiThreadStartOptions);

            //Setup Koce thread
            var koceThreadStartOptions = new ThreadStartOptions { Color = ConsoleColor.Yellow, SleepTime = 200 };
            koceThread.Name = "Koce";
            koceThread.Start(koceThreadStartOptions);
        }
예제 #2
0
        public static void Main(string[] args)
        {
            var cukiThread = new Thread(SayWhatsup);
            var koceThread = new Thread(SayWhatsup);

            //Setup Cuki thread
            var cukiThreadStartOptions = new ThreadStartOptions {
                Color = ConsoleColor.Magenta, SleepTime = 1000
            };

            cukiThread.Name = "Cuki";
            cukiThread.Start(cukiThreadStartOptions);

            //Setup Koce thread
            var koceThreadStartOptions = new ThreadStartOptions {
                Color = ConsoleColor.Yellow, SleepTime = 200
            };

            koceThread.Name = "Koce";
            koceThread.Start(koceThreadStartOptions);
        }