illustrates how to read command-line arguments : Command Line « Development Class « C# / C Sharp






illustrates how to read command-line arguments

/*
Mastering Visual C# .NET
by Jason Price, Mike Gunderloy

Publisher: Sybex;
ISBN: 0782129110
*/

/*
  Example10_4.cs illustrates how to read
  command-line arguments
*/

using System;

public class Example10_4
{

  public static void Main(string[] arguments)
  {

    for (int counter = 0; counter < arguments.Length; counter++)
    {
      Console.WriteLine("arguments[" + counter + "] = " +
        arguments[counter]);
    }

  }

}

           
       








Related examples in the same category

1.Program argument input values: Converts degrees Celsius to degrees Fahrenheit