BaseCollection.SyncRoot BaseCollection.SyncRoot BaseCollection.SyncRoot BaseCollection.SyncRoot Property

定义

获取可用于同步对 BaseCollection 的访问的对象。Gets an object that can be used to synchronize access to the BaseCollection.

public:
 property System::Object ^ SyncRoot { System::Object ^ get(); };
[System.ComponentModel.Browsable(false)]
public object SyncRoot { get; }
member this.SyncRoot : obj
Public ReadOnly Property SyncRoot As Object

属性值

可用于同步 BaseCollection 的对象。An object that can be used to synchronize the BaseCollection.

实现

注解

如果BaseCollectionlock相同, 则IsSynchronized false属性返回, 然后C# 属性返回可与关键字一起使用的SyncRoot对象。If, as is the case with the BaseCollection, the IsSynchronized property returns false, then the SyncRoot property returns an object that can be used with the C# lock keyword.

适用于