I have an IEnumerable object. I would like to access based on index for instance:
for(i=0; i<=Model.Products; i++) { ??? }
Is this
There is no index in IEnumerator. Use
foreach(var item in Model.Products) { ...item... }
you can make your own index if you want:
int i=0; foreach(var item in Model.Products) { ... item... i++; }