I have a small project which received two command line arguments when it's called. But there is something not right with the code and it's crashing with this very strange error message. So I am attempting to launch the Main sub in Module1 using the imediate window to see what's up. I tried this:
and it tells me the Method arguments must be enclosed in paranthesis, so I added parenthesis like this:
and it tells me ')' expected....so I then did this:
Oh boy...the program then tried to run but during the break I opened the watch window to check the values for the arguments and all it's telling me is
my.Application.CommandLineArgs(0) {"Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index"} System.ArgumentOutOfRangeException
my.Application.CommandLineArgs(1) {"Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index"} System.ArgumentOutOfRangeException
So what's the key to passing command line arguments through the imediate window? I can do it from the command line but get the same error message.
P9 : pszqoadhx1u5zahbhohghldgiy4qixhx
Code:
Main C:\Inetpub\maildrop\Drop1\6b08c16101cdc68800000006.eml APS
Code:
Main (C:\Inetpub\maildrop\Drop1\6b08c16101cdc68800000006.eml APS)
Code:
Main '(C:\Inetpub\maildrop\Drop1\6b08c16101cdc68800000006.eml APS)'
Quote:
my.Application.CommandLineArgs(0) {"Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index"} System.ArgumentOutOfRangeException
my.Application.CommandLineArgs(1) {"Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index"} System.ArgumentOutOfRangeException
Quote:
P9 : pszqoadhx1u5zahbhohghldgiy4qixhx