Reading msdn documentation for dictionaries it says : "Public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe."
Those this mean that with a dictionary such as this :
static object syncObject = new object();
static Dictionary<string,MyObject> mydictionary= new Dictionary<string, MyObject>();
Is doing something like the code below unnecessary?
lock (syncObject)
{
context = new TDataContext();
mydictionary.Add("key", myObject);
}