Ways of console pausing

c#, console

Solution

Run the program using any of the following methods:

- ctrl + F5

OR as Rajesh suggested

- `Console.ReadKey() //pauses for any key`

- `Console.ReadLine() //pauses for enter key`

Problem

As I'm new to C#, I searched Google for various stuff which I used to use in C++. One of them is a pause possibility in a console app. A lot of people suggested different ways like ``` System.Console.ReadKey(true); System.Console.WriteLine(); ``` Others even showed self-made functions which 'should' be more efficient than others. And that's a real headache to decide which one is a better solution. Could anyone give any examples of how C# interpret them and which way should be the most efficient?

Original source