Example to do this create a notepad file and save it with any name with a .cs extension and paste in the following code
using System;
class Command
{
public static void Main(String[ ] args)
{
string name= args[0].ToString();
Console.WriteLine("Name Entered via Command Line argument is: "+name);
}
}
use the Visual Studio Command Prompt for this
Once this file is compiled(csc filename.cs) then after u run the exe then give ur name i.e
FileName Radix and then press enter and see the Magic
Command Line argument files can only run like this and if u try to run it in the development environment then it will prompt u an Exception saying
System.IndexOutOfRangeException
Do rate my answer once u find it useful
Thanks & Regards
Radix :rose: