using System.Runtime.InteropServices; using System.Windows; namespace Tetris.Views; public partial class GameWindow : Window { public GameWindow() { AttachConsole(-1); InitializeComponent(); // new GameManager((int)Width, (int)Height, ImageControl); } [DllImport("kernel32.dll")] private static extern bool AttachConsole(int dwProcessId); }