Yip*_*Yay 2 c# properties thread-safety
可以ICollection<T>.Count属性getter被视为原子(因此,threadsafe)?
谢谢.
它完全取决于收藏; ICollection<T>只是一个界面.
我所知道的每个集合只是Int32在其Countgetter中返回一个字段,因此它通常是原子的.
但是,从来没有保证计数在你取得财产后没有改变.
| 归档时间: |
|
| 查看次数: |
150 次 |
| 最近记录: |