ColumnDefinitionCollection.SyncRoot プロパティ
定義
ColumnDefinitionCollection へのアクセスを同期するために使用できるオブジェクトを取得します。Gets an object that can be used to synchronize access to the ColumnDefinitionCollection.
public:
property System::Object ^ SyncRoot { System::Object ^ get(); };
public object SyncRoot { get; }
member this.SyncRoot : obj
Public ReadOnly Property SyncRoot As Object
プロパティ値
ColumnDefinitionCollection へのアクセスの同期に使用できるオブジェクトです。An object that can be used to synchronize access to the ColumnDefinitionCollection.
実装
注釈
コレクションの列挙処理は、本質的にスレッドセーフな処理ではありません。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.