Iterate over command-line arguments and print them out : Command Line « Development « C# / CSharp Tutorial






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]);    
        }
        
    }
}








14.10.Command Line
14.10.1.Display all command-line information
14.10.2.See if arguments are present
14.10.3.Iterate over command-line arguments and print them out
14.10.4.Read user input from command line and change the console color