C#: I want to pass messages like a file path to my forms application like a console application, how would I do that?
I was told I needed to find my main method to add string[] args, but I wouldn’t know which one that would be in Windows Forms. Which would my main method be in C# windows forms application?
Ok, string[] args = Environment.GetCommandLineArgs() is a better option. But I will keep the following answer as an alternative to it.
Look for a file called Program.cs containing the following code fragment…
and change that to
Then access the command line args from your form …