The non-generic .NET collections (System.Collections namespace) can all do this. I've nicked the following snippet from MSDN Queue.SyncRoot page:
Queue myCollection = new Queue();
lock(myCollection.SyncRoot)
{
foreach (Object item in myCollection)
{
// Insert your code here.
}
}
Or you can just create a synchronized wrapper right away:
Queue mySyncCollection = Queue.Synchronized(myCollection);
// No locks required
Unfortunately this is not possible to do with the generic collections so probably you will have to write your own wrappers / extension methods if you want to use generic collections.