c# lock question: lock(this) vs lock(SyncRoot)

Viewed 5399

I have a class with a field of type collection.

Questions:

  1. if I lock(this), do I effectively lock the collection too?
  2. what is more efficient, to do lock(this) or to create a SyncRoot object and do lock(SyncRoot)?
5 Answers
Related