Hi, I have the following code
Dim htb as hashtable = htbTrades.Clone
In this example htbTrades is a hashtable that is declared as a global variable and can be added to by other threads. I want to make sure that no items can be added to the htbTrades hashtable between the Clone and Clear operations. Is SyncLock what I should be using. Will the following achieve my objective.
Dim htb as hashtable
htb = htbTrades.Clone