Tag Archives: Collections

More on IEnumerable and ICollection

Following up from my post yesterday on enhancing IEnumerable with additional features Phil Haack (Program Manager on ASP.NET for MS) posted a comment on the use of the Count Linq extension method and some of the dangers of using it with generic IEnumerables. With this in mind I would suggest updating my code to enhance …

Continue reading

Enhancing the ASP.NET MVC View fornext loop

A common problem with the default ASP.NET MVC view engine, when rendering collections in a for/next construct is the inability to easily determine where you are in the loop. For example a common way of displaying a menu is to use unordered lists and produce the following markup: With the basic for/next loop over an …

Continue reading