What is coming back from Environment.GetCommandLineArgs() when the program runs?
alc6379
Cookie... That's it
2,820 posts since Dec 2003
Reputation Points: 186
Solved Threads: 147
>The method returns only the first argument which is the path of the application.
Of course the first argument will be a path and next will be a name of asso file. Please show us signature of Main() method.
__avd
Posting Genius (adatapost)
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
>The application is a WPF application and I can't find the Main() method.
No problem!
string[] args = Environment.GetCommandLineArgs();
string datafile=""
if(args.Length==2)
datafile=args[1];
__avd
Posting Genius (adatapost)
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241