C# HybridDictionary SyncRoot
Description
HybridDictionary SyncRoot
gets an object that can be
used to synchronize access to the HybridDictionary.
Syntax
HybridDictionary.SyncRoot
has the following syntax.
public Object SyncRoot { get; }
Example
/* w w w .jav a 2 s . c om*/
using System;
using System.Collections;
using System.Collections.Specialized;
public class SamplesHybridDictionary {
public static void Main() {
HybridDictionary myCollection = new HybridDictionary();
lock(myCollection.SyncRoot)
{
foreach (object item in myCollection)
{
// Insert your code here.
}
}
}
}