Olvasás angol nyelven Szerkesztés

Megosztás a következőn keresztül:


DesignerAutoFormatCollection.SyncRoot Property

Definition

Gets an object that can be used to synchronize access to the DesignerAutoFormatCollection object.

C#
public object SyncRoot { get; }

Property Value

An object that can be used to synchronize access to the DesignerAutoFormatCollection.

Implements

Remarks

Enumerating through a collection is not a thread-safe procedure intrinsically. Even when a collection is synchronized, other threads can still modify the collection. This causes exceptions during enumeration.

Lock the collection by using the SyncRoot method during the entire enumeration to guarantee thread safety. For detailed information about locking collections for thread-safe access, see ICollection.SyncRoot.

Applies to

Termék Verziók
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also