Why does the default view for a List in ASP.NET MVC use 'var' to iterate through the items?
- by SLC
The title pretty much sums it up, it puts the following line of code in:
<% foreach (var item in Model) { %>
As the View is auto-generated and uses reflection to work out exactly what item is, so you get intellisense and everything, I just wonder, why do they use var rather than the actual type?