且构网

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

列出<T>没有实现 SyncRoot!

更新时间:2022-01-10 15:56:26

其实是显式实现的.

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.