Linq retrieving index
<p>I need to retrieve the index of my items as I select them in Linq, is this the best way to do it? I don't like the fact that I have to declare a variable outside of my Linq statement.</p>

<pre><code>List&lt;int&gt; ApplianceIds = new List&lt;int&gt;();
ApplianceIds.Add(6);
ApplianceIds.Add(3);
ApplianceIds.Add(4);
ApplianceIds.Add(5);
ApplianceIds.Add(6);
ApplianceIds.Add(7);
ApplianceIds.Add(2);

int ind = 0;

var y = (from a in ApplianceIds
        let index = ind++
        select new {Appliance = a, Index = index}).ToList();
</code></pre>
