DataViewSettingCollection.SyncRoot 属性

定义

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

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

属性值

可用于同步对 DataViewSettingCollection 的访问的对象。An object that can be used to synchronize access to the DataViewSettingCollection.

实现

属性

注解

派生类可以DataViewSettingCollection SyncRoot使用属性提供的同步版本。Derived classes can provide a synchronized version of the DataViewSettingCollection using the SyncRoot property.

程序代码必须始终在的上SyncRoot DataViewSettingCollection执行同步操作DataViewSettingCollection, 而不是直接在上执行。Program code must always perform synchronized operations on the SyncRoot of the DataViewSettingCollection, not directly on the DataViewSettingCollection. 这保证了从其他对象派生的集合的正确操作。This guarantees the correct operation of collections that are derived from other objects. 具体而言, 它与可能同时修改的DataViewSettingCollection其他线程保持正确的同步。Specifically, it maintains the correct synchronization with other threads that might be simultaneously modifying the DataViewSettingCollection.

适用于