How does a program know which arguments are passed?

Moskito

New Member
I'm new to the programming world.I have a data extractor program which extracts data from MySQL into a word template file. I don't understand how the main program knows which argument to pass into the parameters. When running the exe, how does the program knows that \[code\]"Haha, I need to pass a string in there, And it is precisely this string right here"\[/code\] ???.EDIT: This program is supposed to be run when pressing a `Extraction Button' but how the exe program knows where is the string arg parameters? where does the exe get it from?MAIN CODE\[code\]private static void Main(string[] args) { try { if (args[0] == "ALL" || args[0] == "*" || args[0] == "all") { PrintARs(); Console.Read(); } else { CreateARDocument(args[0]); } } catch (Exception ex) { Console.WriteLine(ex.Message); Console.Read(); } }\[/code\]
 
Back
Top