且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么ForEach扩展方法在C#中的ObservableCollections中不可用

更新时间:2022-11-27 22:27:10

正如JJhn所说,这是设计。阅读这篇文章 Lippert了解更多信息。一个标准的 foreach 循环的工作原理也是一样,通常更具可读性。

As JJohn says, it's by design. Read this post by Eric Lippert for more information. A standard foreach loop works just as well and is generally more readable.