In a WPF application, you can access the command line by using the static members of the Environment class...
public MainWindow()
{
var args = Environment.GetCommandLineArgs();
if (args.Length == 1)
{
MessageBox.Show("No argument provided");
Environment.Exit(0);
}
string arg1 = args[1]; // your argument
InitializeComponent();
}
This snippet shows how to do it. Remember that the name of the assembly is always the first argument, so you are interested in args[1] and args[2] etc etc.
The Environment class also has another member: Environment.CommandLine which has the entire command line as a string.
For your second question, your syntax is fine.