Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Declares the string array "args" to hold the
- // command line arguments. Remember it will be a
- // string array.
- private string[] args;
- public MainWindow()
- {
- // Gets the command line arguments
- args = Environment.GetCommandLineArgs();
- // Shows a message box for each argument.
- // Remember that arg[0] will always be the
- // program file name in WPF
- for (int i = 0; i < args.Length; i++)
- {
- MessageBox.Show(args[i] + "\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment