ColumnDefinitionCollection.IsSynchronized 屬性

定義

取得值,這個值表示是否同步處理這個 ColumnDefinitionCollection 的存取 (安全執行緒)。Gets a value that indicates whether access to this ColumnDefinitionCollection is synchronized (thread safe).

public:
 property bool IsSynchronized { bool get(); };
public bool IsSynchronized { get; }
member this.IsSynchronized : bool
Public ReadOnly Property IsSynchronized As Boolean

屬性值

Boolean

如果同步處理這個集合的存取,則為 true,否則為 falsetrue if access to this collection is synchronized; otherwise, false.

實作

備註

透過集合進行列舉在本質上並非安全執行緒程序。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.

適用於