We can pass command line arguments to C# programs. The program accept arguments in the order of args[0], args[1] etc. The following program shows how to pass command line arguments to the c# program. Open a new text document and copy and paste the following source code and save the file as "NewProg.cs"
using System;
class NewProg
{
static void Main(string[] args)
{
Console.WriteLine("Arguments-1 " + args[0]+" Argument-2 "+args[1]);
Console.ReadKey();
}
}