Archive

Archive for the ‘Startup’ Category

retrieving command-line args for WPF application

February 12, 2009 Leave a comment

Normally in winform applications, command line arguments are accessed from the string array argument in the main method. However in WPF main method is auto generated and can not be acceEditssed directly. So how to access the command line args with WPF application.

The answer is use “System.Environment.GetCommandLineArgs”. Calling this method returns command line arguments at any given point of time.

Categories: Startup, WPF