English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

for example, if I type:

C:> myapp.exe -s -t

how do I reference the command line parameters ("-s" and "-t") so I can use them in my application?

2007-08-01 04:09:31 · 2 answers · asked by Scotty Doesnt Know 7 in Computers & Internet Programming & Design

2 answers

Re-declare Main like this:

static void Main(string[] args)

(that's C# syntax btw)

2007-08-01 08:15:48 · answer #1 · answered by Pfo 7 · 0 0

In a console app static void substantial() is substantial(String[] args) args are the parameters being exceeded in working example from command on the spot myprogram.exe john doe arg[0] = john arg[a million] = doe

2016-12-11 07:06:54 · answer #2 · answered by Anonymous · 0 0

fedest.com, questions and answers