CMD commands such as ipconfig/all are well known, but many shoes may not know how to write such a console program with parameters. In fact, it is very simple. Let's first look at the default code for creating a project: using System; using System. collections. generic; using System. linq; using System. text; namespace _ 1 {class Program {static void Main (string [] args. We can see that a string [] args array is used to store program parameters. The parameters are separated by spaces, representing a parameter. If the parameter contains spaces, you can use the "parameter marker" to start with a double index, such as seay.exe "kill you ". Let's write an instance: using System; using System. collections. generic; using System. linq; using System. text; namespace _ 1 {class Program {static void Main (string [] args) {if (args. length <1) {Console. writeLine ("enter the parameter-a-v \" a s \ "");} else {foreach (string key in args) {if (key = "a s ") {Console. writeLine ("This is 'a s' parameters");} else if (key = "-a") {Console. writeLine ("This is 'A' parameters");} else if (key = "-v") {Console. writeLine ("This is 'V' parameters");} else {Console. writeLine ("parameter error") ;}}}} the above Code is clear, we can execute the corresponding operation according to the passed parameters