HttpStaticObjectsCollection::SyncRoot Property

 

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

Namespace:   System.Web
Assembly:  System.Web (in System.Web.dll)

public:
property Object^ SyncRoot {
	virtual Object^ get() sealed;
}

Property Value

Type: System::Object^

The current HttpStaticObjectsCollection.

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.

The following example creates an object used to synchronize access to the HttpStaticObjectsCollection.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: