Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

How can i add a switch to my console app.

ie myapp/? would display help about my app (hmm look familiar to anyone?)

 

thanks

brandon

i'm not lazy i'm just resting before i get tired.
  • *Experts*
Posted
If you want to read command line arguments take a look at System.Environment.CommandLine property, or System.Environment.GetCommandLineArgs method.
Posted
Use Environment.GetCommandLineArgs() to retrieve the arguments passed to the executable. Parse/evaluate the command line args to set the flow of your program.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...