example
1 2 3 4 5 6 7 8 9 10 11 12 |
static int Main( string[] args) { for (int i = 0; i < args.Length; i++) { Console.WriteLine("Arg: {0}", args[i]); } // or foreach (string arg in args) Console.WriteLine("Arg: {0}", arg); return -1; } |
for testing in visual studio
Solution Explorer > Debug > Command line Arguments