title: C#: Incremental string/var Names during While Loop
body: <p>first time posting here.  I'm looking to use a while loop to define several strings/vars.  This code gives an idea of what I'm looking for...</p>
  
  <pre><code>    int i = 0;
      while (i &lt; 4)
      {
      string cmd1 = "Command 1";
      var num1 = 1;
      i++
      }
  </code></pre>
  
  <p>I'm trying to figure out how to get a while loop to somehow output...</p>
  
  <pre><code>string cmd1 = "Command 1";
  var num1 = 1;
  string cmd2 = "Command 2";
  var num2 = 2;
  string cmd3 = "Command 3";
  var num3 = 3;
  string cmd4 = "Command 4";
  var num4 = 4;
  </code></pre>
  
  <p>Thank you in advance for any help.</p>