Hello I am working on a windows forms application that will accept command line args.
To do so I changed: static void Main() -to- static void Main(string[] args) in the program.cs.
My problem is I don't know how to access the args in my Form1.cs with all my event handlers.
Thanks

AlanRank #669 · 3.6K reputationPosted Jan 28, 2008, 9:59 AM EST
An easy way to access command line arguments from anywhere in the application is to use the static System.Environment.GetCommandLineArgs() method:
http://msdn2.microsoft.com/en-us/library/system.environment.getcommandlineargs(VS.80).aspx