Command arguments

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

    #1

    Command arguments

    how can i get the arguments given in the command line?
  • Jon Skeet [C# MVP]

    #2
    Re: Command arguments

    SK <anonymous@disc ussions.microso ft.com> wrote:[color=blue]
    > how can i get the arguments given in the command line?[/color]

    Use a Main method which takes an array of strings as its parameter. The
    arguments will be in there.

    --
    Jon Skeet - <skeet@pobox.co m>
    Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

    If replying to the group, please do not mail me too

    Comment

    • Richard Grimes [MVP]

      #3
      Re: Command arguments

      SK wrote:[color=blue]
      > how can i get the arguments given in the command line?[/color]

      Environment.Get CommandLineArgs () or Environment.Com mandLine

      Richard
      --
      my email evpuneqt@zicf.b et is encrypted with ROT13 (www.rot13.org)
      sign up for my free .NET newsletter at



      Comment

      Working...