exited with code 0. To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops. Press any key to close this window . . . code example
Example 1: how to stop window from terminating c# visual studio
Console.ReadLine(); //add this to the end of the program and the terminal will not close until another key is entered
Example 2: visual studio console closes too fast
Console.ReadLine();