Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- Console.Write("Hello");
- //Console.Write(new string('\n', 10));
- //Console.Write("ten lines later :-)");
- WriteTextInPosition("Not yet a moving line", 10);
- Console.ReadKey();
- }
- public static void WriteTextInPosition(string text, int top)
- {
- for (int i = 0; i < top; i++)
- {
- Console.WriteLine();
- }
- Console.WriteLine(String.Format("{0," + ((Console.WindowWidth / 2) + (text.Length / 2)) + "}", text));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement