Command line arguments in C# application
In your App.xaml.cs
class App : Application
{
//Add this method override
protected override void OnStartup(StartupEventArgs e)
{
//e.Args is the string[] of command line arguments
}
}
It has been mentioned by linquize above, but I think it is worth an answer of its own, as it is so simple...
You can just use:
string[] args = Environment.GetCommandLineArgs();
That works anywhere in the application, not just in App.xaml.cs