Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Getting the command line as a whole

Getting the command line as a whole

Scheduled Pinned Locked Moved C#
csharpjsonquestionlearning
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Brett Slaski
    wrote on last edited by
    #1

    Greetings, I really like the new command line parsing in C# and that is separates paramerters by space, it has been very useful. Of course I have a need to grab the command line as a whole as it was sent to the application and not cutup by it's spaces. Is there any way to do this in C#? The result should be the same as you get from command$ in vb. I would love to change the parameter but it's being sent from another aplication which I cannot change. Thank you in advance for any assistance. Brett

    G 1 Reply Last reply
    0
    • B Brett Slaski

      Greetings, I really like the new command line parsing in C# and that is separates paramerters by space, it has been very useful. Of course I have a need to grab the command line as a whole as it was sent to the application and not cutup by it's spaces. Is there any way to do this in C#? The result should be the same as you get from command$ in vb. I would love to change the parameter but it's being sent from another aplication which I cannot change. Thank you in advance for any assistance. Brett

      G Offline
      G Offline
      George L Jackson
      wrote on last edited by
      #2

      This returns everything (including the EXE): System.Environment.CommandLine

      B 1 Reply Last reply
      0
      • G George L Jackson

        This returns everything (including the EXE): System.Environment.CommandLine

        B Offline
        B Offline
        Brett Slaski
        wrote on last edited by
        #3

        That's ok, it's easily parsed out. Thank you much! Brettski

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups