asp.net.ph

HttpStaticObjectsCollection.SyncRoot Property

System.Web Namespace   HttpStaticObjectsCollection Class


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

[ VB ]
Public ReadOnly Property SyncRoot As Object  Implements _
   ICollection.SyncRoot

[ C# ]
public object SyncRoot {get;}

[ C++ ]
public: __property Object* get_SyncRoot ( );

[ JScript ]
public function get SyncRoot ( ) : Object;

Property Value

The current HttpStaticObjectsCollection.

Implements

ICollection.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.

Example

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

[ VB ]
Dim MySyncObject As Object = Application.StaticObjects.SyncRoot


[ C# ]
Object MySyncObject = Application.StaticObjects.SyncRoot;
See Also

HttpStaticObjectsCollection Members   HttpApplicationState.StaticObjects Property Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph