471,350 Members | 1,835 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

Command Line Arguments


Hello,
I have the following code:
static void Main(string[] args)
{
string c = args[0];

If put the command line argument in the IDE it works fine
If I do this:
"C:\Documents and Settings\xxxx\xxxxxx\Visual Studio
Projects\Music2003\bin\Debug\Music2003.exe A"

It tells me there is no such file
("A" is the parameter)

What am I doing wrong?
Thanks
Mike

Feb 1 '06 #1
4 1225
I think U need to write:
"C:\Documents and Settings\xxxx\xxxxxx\Visual Studio
Projects\Music2003\bin\Debug\Music2003.exe A"

Feb 1 '06 #2
You wrote the same thing I did.

Feb 1 '06 #3
the A should be outside of the quotes.

Best regards,
Dave Colliver.
http://www.BournemouthFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Mike" <am******@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...

Hello,
I have the following code:
static void Main(string[] args)
{
string c = args[0];

If put the command line argument in the IDE it works fine
If I do this:
"C:\Documents and Settings\xxxx\xxxxxx\Visual Studio
Projects\Music2003\bin\Debug\Music2003.exe A"

It tells me there is no such file
("A" is the parameter)

What am I doing wrong?
Thanks
Mike

Feb 1 '06 #4
Great!
Thanks

Feb 1 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Hari | last post: by
6 posts views Thread by Hari | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.