This is a probably an embarasing question as no doubt the answer is blindingly obvious.
I\'ve used Visual Studio for years, but this is the first time I\'ve done any
Use Console.ReadLine() at the end of the program. This will keep the window open until you press the Enter key. See https://docs.microsoft.com/en-us/dotnet/api/system.console.readline for details.
Console.ReadLine()