且构网

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

清单< T>不实现SyncRoot上!

更新时间:2022-06-25 20:36:03

它实际上是明确落实。

object ICollection.SyncRoot
{
    get
    {
        if (this._syncRoot == null)
        {
            Interlocked.CompareExchange(ref this._syncRoot, new object(), null);
        }
        return this._syncRoot;
    }
}

这意味着你必须转换为 ICollection的来使用它。

This means you must cast to ICollection to use it.