title: Check command line arguments for input value
body: <p>i am using command line arguments and if conditions are used to check the input values but it is not looking good can i change it to switch but i have no idea how to change it my code is</p>
  
  <pre><code>if (args.Length &gt; 0 &amp;&amp; args.Length == 4)
  {
      string programName = args[0];
      string file1= args[2];
      string file2= args[3];
  
      bool flag = false;
      int num= 0;
      bool isNum = Int32.TryParse(args[1].ToString(), out num);
  
      if (!(programName.Equals("Army")))
      {
          Console.WriteLine("Error"); 
      }
  
      if (!Int32.TryParse(args[1].ToString(), out isNum ))
      {
          Console.WriteLine("value should be a number");
      }
  
      if (!File.Exists(file1))
      {
          Console.WriteLine("file 1 does not exist");
      }
      if (!File.Exists(file2))
      {
          Console.WriteLine("file 2 does not exist");
      }
  </code></pre>