string s = "Hello|World"; Console.SetCursorPosition((Console.WindowWidth - s.Length) / 2, Console.CursorTop); Console.WriteLine(s);