Display all command-line information : Command Line « Development « C# / CSharp Tutorial






using System; 
 
class MainClass {  
  public static void Main(string[] args) { 
    Console.WriteLine("There are " + args.Length + 
                       " command-line arguments."); 
 
    Console.WriteLine("They are: "); 
    for(int i=0; i < args.Length; i++)  
      Console.WriteLine(args[i]);  
  }  
}
There are 0 command-line arguments.
They are:








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