> I wrote:
> 
> > I would guess that it has not so much to do with ArgIterator being a
> > special type, but that in this instance, iterator itself is stack
> > allocated.  Frankly, I don't think this requires documentation.  We
> > all know that you can't return a stack allocated struct from a 
> > function.
> > Fortunately, we now have a compiler that won't let us do this
> > accidentally.
> 
> This was a foolish thing to post.  I hit send before thinking 
> too deeply about it. Of course the boxing operation should 
> copy the struct to the heap. Sorry.

        Well, the assumption was not that weird. If you check out the
MSIL of ArgIterator, there is no special attribute attached to it. Which
makes me wonder, why does the compiler generate an error on this object?
Is that object hardcoded in the compiler or is there a special attribute
attached to it that isn't visible in the MSIL? (so you can use that
yourself in your code too)

        FB

Reply via email to