0

I've just write a very simple console application in Visual C# stdudio 2008 and got a message. But I really don't understand what the hell is that? So please let me know what is that and how to solve that problem. Thanks in advanced.

Attachments untitled6.JPG 94.81 KB
3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by progcomputeach
0

The error is saying that there is no value in args[0] position or in args[] array. It's blank and you are trying to access value from index 0 thoght args [] array is blannk.

I believe you should have to pass value as argument at the time of running program from command prompt.

Hope this helps !
Thanks,
Rohan

1

Thats right-you have to open a command prompt.
1. Find out where on your computer your project is.
2. Change directory at the command prompt.
3. Run the program from there and supply some command line arguments(they will be strings).

e.g. YourProg.exe ABC DEF GHI

ABC will be args[0] -> args[0], args[1] and args[2] will be picked up
DEF will be args[1]
GHI will be args[2]

The error is saying that there is no value in args[0] position or in args[] array. It's blank and you are trying to access value from index 0 thoght args [] array is blannk.

I believe you should have to pass value as argument at the time of running program from command prompt.

Hope this helps !
Thanks,
Rohan

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.