C# How to keep the Console Window open in Debug mode

Visual Studio에서 F5(Debug) 실행시 콘솔창을 계속 열기 위한 방법

source code에 아래와 같이 추가해준다.

// Keep the console window open in debug mode.
Console.WriteLine(“Press any key to exit.”);
Console.ReadKey(); // wait for any key to press