I tried having a:
static int main(string[] args)
and returning
return 1;
but in debug, the console always says
exited with code 0 (0x0).
What do I have to do to send an exit code?
Cheers
static int Main(string[] args)
static void Main(string[] args)
The parameter of the Main method is a string array that represents the command-line arguments. Usually you check for the existence
of the arguments by testing the Length property, for example:
if (args.Length == 0)
{
Console.WriteLine("Please enter a numeric argument.");
return 1;
}
So this should work.
--
Robert Jeppesen
MindCom AB
http://www.mindcom.se/
"Anthony Shorrock" <ashorro...@hotmail.com> wrote in message news:ekobT20UCHA.4092@tkmsftngp11...
--
Greg
http://www.claritycon.com/
"Anthony Shorrock" <ashorro...@hotmail.com> wrote in message
news:ekobT20UCHA.4092@tkmsftngp11...