SyntaxFix
Write A Post
Hire A Developer
Questions
Jon Skeet created a SmartEnumerable<T> type a while back to solve this exact issue. You can see it's implementation here:
SmartEnumerable<T>
http://codeblog.jonskeet.uk/2007/07/27/smart-enumerations/
To download: http://www.yoda.arachsys.com/csharp/miscutil/