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?
Run the program using any of the following methods:
OR as Rajesh suggested
Console.ReadKey() //pauses for any key
Console.ReadLine() //pauses for enter key
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With