0
comment
comment
on 11/14/2012 2:10 AM
Some times you encounter a class that implements IEnumerator without any IEnumerable implementation. To preserve the spirit of the enumerator (basically a cursor) we can just add an extension method that yields the elements.
But most of the time it’s simply to add a “.Cast()" if it is IEnumerable without the extra type information.<div style="clear: both;"></div>