Sometimes console applications should run in some kind of "deamon" or "job" state without showing the console window at all.
You can achive this via code. One possibility would be f.e.:
static extern IntPtr GetConsoleWindow();
static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
const int SW_HIDE = 0;
const int SW_SHOW = 5;
var handle = GetConsoleWindow();
But wait! There's no need for this piece of code.
- Right-click the console application project and select properties
- Select the application tab
- Select Windows Application from the Output Type dropdown: