Gets an object that can be used to synchronize access to the Hashtable.
[Visual Basic] Overridable Public ReadOnly Property SyncRoot As Object [C#] public object SyncRoot {virtual get;} [C++] public: __property virtual Object* get_SyncRoot(); [JScript] public function get SyncRoot() : Object;
An object that can be used to synchronize access to the Hashtable.
The root object for a Hashtable is used when performing synchronized operations on the Hashtable. Instead of synchronizing directly on a Hashtable, program code should always synchronize on the root of the Hashtable. This ensures proper operation of hashtables that are derived from other objects; proper synchronization is maintained with other threads that might be simultaneously modifying the Hashtable object.
Hashtable Class | Hashtable Members | System.Collections Namespace | IsSynchronized | Synchronized