C # | Raise the Console Application window

5

How do I increase the Console Application window in C #?

I use Visual Studio 2017 Community.

My program will be done in Console Application, I need to change the size of the Console window being generated.

    
asked by anonymous 07.06.2018 / 16:38

2 answers

4

You can change using Console.SetWindowSize :

 Console.SetWindowSize(60, 100);

You can also set height Console.WindowHeight or width Console.WindowWidth

Attention because if you put a size bigger than the available one will throw you an exception.

    
07.06.2018 / 16:46
4

You can use the method Console.SetWindowSize of the Console class to define the window dimensions.

        static void Main(string[] args)
        {
            Console.SetWindowSize(10, 5);
            Console.ReadKey();
        }
    
07.06.2018 / 16:46