title: value cannot be null. parameter name path
body: <p>I put a command line argument value <code>"1|2|c:\temp"</code> under properties-> debug box. </p>
  
  <p>In my code I read data using </p>
  
  <pre><code>string[] args = Environment.CommandLine.Split('|').ToArray(); 
  </code></pre>
  
  <p>When I run application I get all argument value and working fine but when I run exe file I am getting </p>
  
  <blockquote>
    <p>value cannot be null. parameter name path</p>
  </blockquote>
  
  <p>I searched google but did not get any idea of reason and how to solve that. </p>
  
  <p>Code:</p>
  
  <pre><code>string[] args = Environment.CommandLine.Split('|').ToArray(); 
  
  for (int i = 0; i &lt; args.Count(); i++)
  {
      switch (i)
      {
          case 0:
              break;
          case 1:
              break;
          case 2:
              this.ImageFilePath = args[i];
              break;
          case 3:
              this.ImageFileName = args[i];
              break;
          }
      }
  </code></pre>
  
  <p>Please give me solution or idea to resole error.</p>