The arguments you send to your program are sent as the String[]
array in the Main
function of your program. These are called Command-Line Arguments. If you know how to use a String
array, you know how to use them.
static void Main(string[] args)
{
foreach (var arg in args)
{
Console.WriteLine(arg);
}
}
By the way, to add your program to the context menu of the file, you need to modify the registry. If you search online, you'll find enough tutorials and articles about this.