473,399 Members | 3,302 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 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 1289
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Hari | last post by:
can i have command line arguments in VS.NET applicatio? if yes how? Can i have some code snippets of the above functionality? I know we can acjieve this in console application form command...
2
by: SunRise | last post by:
Hi I am creating a C Program , to extract only-Printable-characters from a file ( any type of file) and display them. OS: Windows-XP Ple help me to fix the Errors & Warnings and explain...
1
by: amirmira | last post by:
I would like to set command line arguments to a service at install time. I need to do this because I need to get information from different registry locations depending on my command line argument....
6
by: Hari | last post by:
can i have command line arguments in VS.NET applicatio? if yes how? Can i have some code snippets of the above functionality? I know we can acjieve this in console application form command...
7
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.