Thanks. This LINQ stuff is new to me. I still prefer to code in C (not C++, or C#, but rather K&R’s C).
And my programming background is in embedded systems running on 8-bit mico’s. While modern compilers do a good job at optimizing, I still see for-loops as 4 distinct actions
- The initializtion
(i=0; ...) - The check for completion
(...; i<max_loop; ...) - The actions to perform
{ ...} - The action to perform after #3
(... i++)
So if it is only going to happen once, steps 1, 2, and 4 are wastes of time.
(just my $0.02)