Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- while (true)
- {
- for (int i = 0; i < 20; i++)
- {
- WriteTextInPosition("a moving line", i);
- }
- Thread.Sleep(250);
- }
- }
- public static void WriteTextInPosition(string text, int bot)
- {
- Console.Clear();
- for (int i = 1; i <= bot; i++)
- {
- Console.WriteLine();
- }
- Console.WriteLine(String.Format("{0," + ((Console.WindowWidth / 2) + (text.Length / 2)) + "}", text));
- }
Advertisement
Add Comment
Please, Sign In to add comment