Why enumerator structs are a really bad idea

Posted on Dot net Slackers See other posts from Dot net Slackers
Published on Wed, 19 May 2010 00:00:00 GMT Indexed on 2010/05/20 14:50 UTC
Read the original article Hit count: 268

Filed under:
If you've ever poked around the .NET class libraries in Reflector, you probably would have noticed that the generic collection classes all have implementations of their IEnumerator as a struct rather than a class. As you will see, this design decision has some rather unfortunate side effects......

Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.



Email this Article

© Dot net Slackers or respective owner