title: how to use Command line parameter in viewmodel (MVVM Model) wpf application
body: <p>I have an WPF application which can take command line parameter. I want to use this command line parameter in ViewModel, I have following options to do that.</p>
  
  <p>1) create public static variable in app.xaml.cs . read command line parameter value in main method and assign it to  public static variable. that can be accessed in viewmodel using App.variablename.</p>
  
  <p>2) create environment variable like System.Environment.SetEnvironmentVariable("CmdLineParam", "u") and later use it in viewmodel with Environment.GetEnvironmentVariable("CmdLineParam").</p>
  
  <p>I want to ask which approach is good considering MVVM pattern and if there is better method to achieve this.</p>