How to get command line args in WPF?

Are you looking how to get the command line arguments in WPF?

It is actually really easy. Simple call Environment.GetCommandLineArgs()

You will be returned a string array (string[]). Remember, the first value is that of the exe being called. i.e your app.


[csharp] Environment.GetCommandLineArgs() [/csharp]

Happy Coding!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.