News:

Choose a design and let our professionals help you build a successful website   - ITAcumens

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

Quick Reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it has been approved by a moderator.

Name:
Email:
Verification:
Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

Shortcuts: ALT+S post or ALT+P preview