Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string defaultString = "A moving line";
- int i = 0;
- int a = 0;
- while (true)
- {
- if (i % 2 == 0 && a < 10)
- {
- WriteTextInPosition(defaultString, a);
- Thread.Sleep(50);
- a++;
- }
- if (a == 9)
- i++;
- if (a == 0 && i % 2 != 0)
- i--;
- if (i % 2 != 0 && a > 0)
- {
- a--;
- WriteTextInPosition(defaultString, a);
- Thread.Sleep(50);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment