Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading;
- namespace TestDaLuong
- {
- class Program
- {
- static void Main(string[] args)
- {
- Thread t1 = new Thread(new ThreadStart(a));
- Thread t2 = new Thread(new ThreadStart(b));
- Thread t3 = new Thread(new ThreadStart(c));
- t1.Start();
- t2.Start();
- t3.Start();
- Console.ReadLine();
- }
- static void a()
- {
- for (int i = 0; i < 100; i++)
- {
- Console.Write("1");
- }
- }
- static void b()
- {
- for (int i = 0; i < 100; i++)
- {
- Console.Write("2");
- }
- }
- static void c()
- {
- for (int i = 0; i < 100; i++)
- {
- Console.Write("3");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment