Mega Code Archive

 
Categories / C# Tutorial / Development
 

Iterate over command-line arguments and print them out

using System; class MainClass {     public static void Main(string[] args)     {         for (int arg = 0; arg < args.Length; arg++){             Console.WriteLine("Arg {0}: {1}", arg, args[arg]);             }              } }