The OnStartup(StartupEventArgs e) method signature contains StartupEventArgs as a method parameter. It contains a property, Args, that returns a string array of the command line arguments that were passed to the application. If no command line arguments were passed, the string array will have zero items in it.
Now, by checking the condition, we launch the desired window that we want to show to the user. You can also take arguments such that the application launches in normal mode, maximized mode, or minimized. You can also use it to open the application as hidden, in some specific cases.