HttpStaticObjectsCollection.SyncRoot Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets an object that can be used to synchronize access to the collection.
public:
property System::Object ^ SyncRoot { System::Object ^ get(); };
public object SyncRoot { get; }
member this.SyncRoot : obj
Public ReadOnly Property SyncRoot As Object
Property Value
The current HttpStaticObjectsCollection.
Implements
Examples
The following example creates an object used to synchronize access to the HttpStaticObjectsCollection.
Object MySyncObject = Application.StaticObjects.SyncRoot;
Dim MySyncObject As Object = Application.StaticObjects.SyncRoot
Remarks
Program code should generally perform synchronized operations on the SyncRoot of a collection, not directly on the collection itself. This ensures proper operation of collections that are derived from other objects. Specifically, it maintains proper synchronization with other threads that might be simultaneously modifying the collection object.
The object returned in this implementation is the HttpStaticObjectsCollection itself.