迭代器和版本控制 [英] Iterators and versioning

查看:80
本文介绍了迭代器和版本控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到使用迭代器可以修改集合,而

枚举它的元素。这是设计还是仅仅是他们实施的b / b $ b $的副作用?查看生成的类的反汇编I

请注意编译器生成的枚举器没有版本检查。有没有

在www的任何地方对此进行深入分析?


谢谢


kh

I notice that using iterators it is possible to modify a collection whilst
enumerating over it''s elements. Is this by design or just a side-effect of
their implementation? Viewing the disassembly for the generated classes I
note that the compiler-generated enumerator has no version checking. Is there
an in-depth analysis of this on the www anywhere?

Thanks

kh

推荐答案

我不明白这个问题......你是否在通过

集合进行迭代时说,你有一个方法来修改它吗?..如果是这样,修改的方法是作为集合对象的一部分给出的

,你不应该使用它而

迭代通过清单


VJ


" kh" < kh@newsgroups.nospam>在留言中写道

新闻:F3 ********************************** @ microsof t.com ...
I don''t understand this question... are you saying while iterating through a
collection, you have a method to modify it?.. if so, the method to modify is
given as part of the collection object, you should not use it while
iterating through the list

VJ

"kh" <kh@newsgroups.nospam> wrote in message
news:F3**********************************@microsof t.com...
我注意到使用迭代器可以修改一个集合,同时枚举它的元素。这是设计还是仅仅是其实施的副作用?查看生成的类的反汇编我注意到编译器生成的枚举器没有版本检查。是否
在www的任何地方对此进行深入分析?

谢谢

kh
I notice that using iterators it is possible to modify a collection whilst
enumerating over it''s elements. Is this by design or just a side-effect of
their implementation? Viewing the disassembly for the generated classes I
note that the compiler-generated enumerator has no version checking. Is
there
an in-depth analysis of this on the www anywhere?

Thanks

kh



这是我的问题的一部分?????????

it s part of my question ?????????


我不明白什么这个问题要么是


VJ


< mu ************ @ gmail.com>在消息中写道

news:11 ********************** @ v46g2000cwv.googlegr oups.com ...
i don''t understand what this question is either

VJ

<mu************@gmail.com> wrote in message
news:11**********************@v46g2000cwv.googlegr oups.com...
这是我的问题的一部分??????????
it s part of my question ?????????



这篇关于迭代器和版本控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆