Re: Last row in foreach loop
- From: Søren Reinke <soren@xxxxxxxxxxxxxxxx>
- Date: Sat, 01 Mar 2008 10:20:46 +0100
Jon Skeet [C# MVP] wrote:
tshad <tshad@xxxxxxxxxxxxxx> wrote:Is there a way to know if you are looking at the last record record of foreach loop other then setting up a loop counter that you manually increment?
There is using "SmartEnumerable" from my (free) MiscUtil library:
http://pobox.com/~skeet/csharp/miscutil/usage/smartenumerable.html
Nice :)
'When C# 3 is released, this pattern will be made even simpler with'
Any chance for that update ? :-)
See ya
Søren Reinke
.
- Follow-Ups:
- Re: Last row in foreach loop
- From: Jon Skeet [C# MVP]
- Re: Last row in foreach loop
- References:
- Re: Last row in foreach loop
- From: Jon Skeet [C# MVP]
- Re: Last row in foreach loop
- Prev by Date: Re: Static vs. instance method: Which one performs better?
- Next by Date: Re: Last row in foreach loop
- Previous by thread: Re: Last row in foreach loop
- Next by thread: Re: Last row in foreach loop
- Index(es):
Relevant Pages
|