Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Work
- {
- public void Count()
- {
- for (int i = 0; i < 100; i++)
- {
- DateTime date = DateTime.Now;
- Console.SetCursorPosition(0, 1);
- Console.Write(new string(' ', Console.WindowWidth));
- Console.SetCursorPosition((Console.WindowWidth - 8) / 2, 0);
- Console.Write(String.Format("{0:HH:mm:ss}", date));
- Console.WriteLine();
- if (i == 90)
- {
- i = 0;
- }
- else
- {
- // Continue
- }
- }
- }
- }
- class Program
- {
- public static void Main(string[] args)
- {
- Console.CursorVisible = false;
- Work w = new Work();
- Console.WriteLine("Main Thread Start");
- ThreadStart s = w.Count;
- Thread thread1 = new Thread(s);
- thread1.Start();
- int i = 2;
- Console.SetCursorPosition(0, i);
- i = i + 1;
- Console.WriteLine("Input:");
- string input = Console.ReadLine();
- Console.WriteLine(input);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement