Foreach loop Internals

A Foreach loop automatically produces a Cast to the object you pass. So its sometimes irrelevant to use var inside foreach loop.

Next Recommended Reading How to Looping through the XML document