Oh, that brings a tear to my eye.
With all the time I spent on optimizing, that is usually the first kind of code to get eliminated. Even a small container, perhaps with 20 items, could suffer a penalty of several nanoseconds in accumulated overhead. If you had thousands or tens of thousands of items, the result could approach microseconds in overhead.
Hodgman is absolutely right about that. Congratulations on writing reusable code. Now someone like me will probably need to replace it with a (usually much simpler) piece of specialized code. The Lambda function version is pretty good assuming it gets inlined, but if it doesn't, well, it will probably look like a traditional simple for loop with simple member access. Exactly like the kind of thing that was trying to be avoided in the first place.