This program is useful to understand how can you give command line arguments in C#.
using System;
class Program {
static void Main(string[] args) {
Console.WriteLine("\nNumber of CommadLine Arguments :" + args.Length);
Console.Write("\nCommandline Arguments Are :\t");
for (int i = 0; i < args.Length; i++) {
Console.Write(args[i] + "\t");
}
Console.ReadLine();
}
}Note
You have to run this program using csc command.
You have to run this program using csc command.
usage: csc program <your command line argument value>
csc - csharp compiler available in Developer Command Prompt for Visual studio
