1) Ditch ForEach(Action<T>) because it allocates
2) Implement Enumerator to support foreach keyword
3) Implement IEnumerable<T> to support Linq (don't use it though)
4) In ToArray() copy the whole block of memory (or rather two) instead of copying one by one
1) Ditch
ForEach(Action<T>)
because it allocates 2) Implement Enumerator to supportforeach
keyword 3) ImplementIEnumerable<T>
to support Linq (don't use it though) 4) InToArray()
copy the whole block of memory (or rather two) instead of copying one by one