I read a lot of things here on stackoverflow, comments, opinions and every kind of ideas. But anyway, I really need an explained way to exit my console application (I'm on VS2010 Framework 4) on C# with a custom error.
The best thing I could read right now is on VB:
Private Declare Sub ExitProcess Lib "kernel32" (ByVal uExitCode As Long)
and use ExitProcess(1) for an error or ExitProcess(0)
So my questions are:
Some previously questions marked as bibliography:
What is the command to exit a Console application in C#?
http://geekswithblogs.net/mtreadwell/archive/2004/06/06/6123.aspx
You can: