How to increase the size of the console window in C#?

廉价感情. 提交于 2019-12-01 18:58:34

No programming is required. Create a shortcut to your program on the desktop. Right-click it, Properties, Layout tab. Adjust the Width property of the screen buffer and window size.

But you can do it programmatically too, those Windows API functions you found are wrapped by the Console class as well. For example:

    static void Main(string[] args) {
        Console.BufferWidth = 100;
        Console.SetWindowSize(Console.BufferWidth, 25);
        Console.ReadLine();
    }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!