RowDefinitionCollection.SyncRoot RowDefinitionCollection.SyncRoot RowDefinitionCollection.SyncRoot RowDefinitionCollection.SyncRoot Property

定義

取得可用以同步存取 RowDefinitionCollection 的物件。Gets an object that can be used to synchronize access to the RowDefinitionCollection.

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

屬性值

可用以同步存取 RowDefinitionCollection 的物件。An object that can be used to synchronize access to the RowDefinitionCollection.

實作

備註

透過集合進行列舉在本質上並非安全執行緒程序。Enumerating through a collection is intrinsically not a thread-safe procedure. 即使集合經過同步化,其他的執行緒仍可修改該集合,使列舉值擲回例外狀況。Even when a collection is synchronized, other threads can still modify the collection, which causes the enumerator to throw an exception. 若要保證列舉期間的執行緒安全, 您可以在整個列舉期間鎖定集合, 或攔截由其他執行緒所做的變更所造成的例外狀況。To guarantee thread safety during enumeration, you can either lock the collection during the entire enumeration or catch the exceptions that result from changes made by other threads.

適用於