How can command-line arguments be retrieved in a WPF application?
Answer Posted / Mamraj Singh
To retrieve command-line arguments in a WPF application, you can access the `args` property of the `System.Diagnostics.Process` class within your app's `App.xaml.cs`. Here's an example:
```csharp
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
var args = e.Args;
// Use the args array as needed...
}
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
No New Questions to Answer in this Category !! You can
Post New Questions
Answer Questions in Different Category