How to iterate through two IEnumerables simultaneously?
<p>I have to enumerables <code>IEnumerable&lt;A&gt; list1</code> and <code>IEnumerable&lt;B&gt; list2</code> and would like to iterate through them simultaneously like:</p>

<pre><code>foreach((a, b) in (list1, list2)) {
  // use a and b
}
</code></pre>

<p>If they do not contain the same number of elements, an exception should be thrown.</p>

<p>What is the best way to do this?</p>
