How can I make it so when there are arguments added to the end of the program name it does a specific method or whatever?
Also, is there a name for this?
Example
here is a snippet
class myclass
{
public static void main(string [] args)
{
if(args.Length == 1)
{
if(args[0] == "/i")
{
Console.WriteLine("Parameter i");
}
}
}
}
The %1 is actually syntax for BAT files to pass the parameter through. So if you see program.exe %1 in a file named cmd.bat, you can call cmd.bat /i and the /i will be passed through to program.exe