[Mono-dev] [PATCH] System.Collections.Generic.{Stack, Queue} API updates

Ben Maurer bmaurer at ximian.com
Sun Sep 4 18:17:12 EDT 2005


On Sun, 2005-09-04 at 16:00 -0600, David Waite wrote:
> +               [Serializable, StructLayout(LayoutKind.Sequential)]
>                 public struct Enumerator : IEnumerator <T>,
> IEnumerator, IDisposable {

The StructLayout change is very interesting. The only reason I could see
for them to do that would be to allow the optimization of enumerators
inside the JIT. It'd be interesting to look at a debugger and see what
kind of bytecode they are emitting for the foreach pattern.

-- Ben




More information about the Mono-devel-list mailing list