2629881

Untitled

Jul 25th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 KB | None | 0 0
  1. static void Main(string[] args)
  2.         {
  3.             while (true)
  4.             {
  5.                 WriteTextInPosition("Not yet a moving line", 20);
  6.                 Console.ReadKey();
  7.             }  
  8.  
  9.            
  10.         }
  11.        
  12.         public static void WriteTextInPosition(string text, int bot)
  13.         {
  14.            
  15.             for (int j = 0; j < bot; j++)
  16.             {
  17.                 Console.Clear();
  18.                 for (int i = 1; i <= j; i++)
  19.                 {
  20.                     Console.WriteLine();
  21.                 }
  22.                 Console.WriteLine(String.Format("{0," + ((Console.WindowWidth / 2) + (text.Length / 2)) + "}", text));
  23.                 Thread.Sleep(250);
  24.             }
  25.         }
Advertisement
Add Comment
Please, Sign In to add comment