using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace _1 { class Program { static void Main(string[] args) { } } }
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(“请输入参数 -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(“参数错误”); } } } } } }