Friday, January 28, 2011

WPF Interview Questions ,How do I retrieve command-line arguments in my WPF application?



Command-line arguments are typically retrieved via a string array parameter passed to Main, but the common way to define WPF applications doesn’t allow you to implement the Main method. You can get around this in two different ways. One way is to forego defining an Application-derived class in XAML, so you can manually define the Main method with a string array parameter. The easier way, however, is to simply call System.Environment.GetCommandLineArgs at any point in your application, which returns the same string array you’d get inside Main.



No comments:

Post a Comment

Thermal conductivity calculations, experiments, molecular simulations

Nowadays various experimental procedures are there to calculate the thermal conductivity of various materials using various techniques. Th...

About Me

COTACT: studymaterialforall@gmail.com