title: How do I make the foreach instruction iterate in 2 places?
body: <p>how do I make the foreach instruction iterate both in the "files" variable and in the "names" array?</p>
  
  <pre><code>var files = Directory.GetFiles(@".\GalleryImages");
  string[] names = new string[8] { "Matt", "Joanne", "Robert","Andrei","Mihai","Radu","Ionica","Vasile"};
  </code></pre>
  
  <p>I've tried 2 options.. the first one gives me lots of errors and the second one displays 8 images of each kind</p>
  
  <pre><code>foreach(var file in files,var i in names)
  {
  //Do stuff
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>foreach(var file in files)
  {
     foreach (var i in names)
      { 
       //Do stuff
      }
   }
  </code></pre>