Nano's Blog

01/02/2010

Command Line Arguments

Filed under: programming — Tags: , — nano @ 06:16
// arguments: A B C D
using System;

public class Hello3
{
    public static void Main(string[] args)
    {
        Console.WriteLine("Hello, World!");
        Console.WriteLine("You entered the following {0} command line arguments:",
           args.Length);
        for (int i = 0; i < args.Length; i++)
        {
            Console.WriteLine("{0}", args[i]);
        }
    }
}

Input A B C D at the field text area of csporj file properties -> Debug -> Command line agurment

- from msdn.com

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress