Command Line Arguments

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike

    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:\Documen ts and Settings\xxxx\x xxxxx\Visual Studio
    Projects\Music2 003\bin\Debug\M usic2003.exe A"

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

    What am I doing wrong?
    Thanks
    Mike

  • Yitzhak Gootvilig

    #2
    Re: Command Line Arguments

    I think U need to write:
    "C:\Documen ts and Settings\xxxx\x xxxxx\Visual Studio
    Projects\Music2 003\bin\Debug\M usic2003.exe A"

    Comment

    • Mike

      #3
      Re: Command Line Arguments

      You wrote the same thing I did.

      Comment

      • David

        #4
        Re: Command Line Arguments

        the A should be outside of the quotes.

        Best regards,
        Dave Colliver.

        ~~
        http://www.FOCUSPortals.com - Local franchises available


        "Mike" <ampeloso@gmail .com> wrote in message
        news:1138808039 .740194.276140@ o13g2000cwo.goo glegroups.com.. .[color=blue]
        >
        > 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:\Documen ts and Settings\xxxx\x xxxxx\Visual Studio
        > Projects\Music2 003\bin\Debug\M usic2003.exe A"
        >
        > It tells me there is no such file
        > ("A" is the parameter)
        >
        > What am I doing wrong?
        > Thanks
        > Mike
        >[/color]


        Comment

        • Mike

          #5
          Re: Command Line Arguments

          Great!
          Thanks

          Comment

          Working...