The code is correct I checked, and there is no real problem with my PC, my hardware is a bit old but it can do the job, so I'm guessing it's the settings of Visual Studio, I use the 2017 community edition and the solution is a consol application. the solution runs but I don't see my msg or anything, just the consol opening and closing real fast
You are probably running the application in debug, without something to prevent it to close as soon as the job gets done.
Basically, your code executes, and the application shuts because there is nothing else left to do.
In both case, the console won't close itself automatically :).