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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…