var items = new[] { new { x = 1 } };
foreach (var item in items)
{
}
Attempting to apply the "Convert to for" code fix results in:
var items = new[] { new { x = 1 } };
for (int i = 0; i < items.Length; i++)
{
var item = (var)items[i];
}
where the (var) cast is invalid.
Attempting to apply the "Convert to for" code fix results in:
where the
(var)cast is invalid.