阅读背景:

有没有办法检查是否正在使用For Each循环访问IEnumerable?

来源:互联网 

Suppose I have an IEnumerable such as a List(TValue) and I want to keep track of whether this list is being accessed (to prevent issues with, say, adding to the list while it is being iterated over on a different thread); I can always write code such as the following:Suppose I have an IEnumerable such as a List(TV




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: