What is best practice when closing a C# application?
I have read that you can use:
Environment.Exit(0); or Application.Exit();
But what is the difference?
Furthermore, with regards to Environment.Exit(0), I have used exit codes before when working with Java but have never fully understood their purpose. What role do they play when exiting an application in C#?
See Question&Answers more detail:os