News:

GinGly.com - Used by 85,000 Members - SMS Backed up 7,35,000 - Contacts Stored  28,850 !!

Main Menu

Command Line Arguments

Started by OmMuruga, May 04, 2009, 08:27 PM

Previous topic - Next topic

OmMuruga

using System;

public class CommandLine {
   public static void Main(string[] args) {
       // The Length property is used to obtain the length of the array.
       // Notice that Length is a read-only property:
       Console.WriteLine("Number of command line parameters = {0}", args.Length);
       for (int i = 0; i < args.Length; i++) {
           Console.WriteLine("Arg[{0}] = [{1}]", i, args);
       }
   }




Sample output:

Number of command line parameters = 3
Arg[0] = [one]
Arg[1] = [two]
Arg[2] = [three]

:acumen :acumen